Answers for "select value from dropdown and submit form in jquery"

0

select value from dropdown and submit form in jquery

<div class="dropdown show">
      <a class="btn btn-filter dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
       <select name="sort_by" id='short_by' class="selection">
          <option value="">Short By</option>
          <option value="popularity">By Popularity</option>
          <option value="ASC">By Name A - Z</option>
          <option value="DESC">By Name Z - A</option>
          </select> 
       </a>
</div>  

<script type="text/javascript">
       $(document).ready(function(){
          $('#short_by').change(function(){    
            $('#filterform').submit(); // form id
        });
      });   
  </script>
Posted by: Guest on December-17-2020

Code answers related to "select value from dropdown and submit form in jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language