'Javascript code doesnot work on safari , rails on change submit

$(document).ready(function() {
  $('.instant-submit').on('change', function() {
     this.form.submit();
  });
});
<%= form_with(url: profile_path, method: :get) do |form| %>
  <select class="form-control filter instant-submit" id="data" name="data" >
  <option <%= params[:data] == "Weekly" ? "selected" : "" %> value="Weekly" > <%= 
 link_to "Weekly",class: 'form-control'%> </option>
 <option <%= params[:data] == "Daily" ? "selected" : "" %> value="Daily"> <%= link_to 
"Daily", class: 'form-control' %></option>
</select>
<% end %>

THis is my code, it doesnot work on safari ? I am trying to submit form on change select. It works on chrome and other browser but not in safari. Why ?

THis is my code,



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source