select value from dropdown and submit form in jquery

Solutions on MaxInterview for select value from dropdown and submit form in jquery by the best coders in the world

showing results for - "select value from dropdown and submit form in jquery"
Alina
15 Mar 2016
1<div class="dropdown show">
2      <a class="btn btn-filter dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
3       <select name="sort_by" id='short_by' class="selection">
4          <option value="">Short By</option>
5          <option value="popularity">By Popularity</option>
6          <option value="ASC">By Name A - Z</option>
7          <option value="DESC">By Name Z - A</option>
8          </select> 
9       </a>
10</div>  
11
12<script type="text/javascript">
13       $(document).ready(function(){
14          $('#short_by').change(function(){    
15            $('#filterform').submit(); // form id
16        });
17      });   
18  </script>