_base_search_form_script.html 293 Bytes
Newer Older
1
2
3
4
<script>
  $(function() {
      // redirect to the url contained in data-url of the selected <option>
      $('#search-form :input').change(function(event) {
5
          var url = $(':selected', event.target).data('url');
6
7
8
9
          if (url) window.location.href = url;
      });
  });
</script>