parm530
1/15/2019 - 2:56 PM

Select Tag Value

// jQuery for the value of a select tag value
 
 /*
  This is the select dropdown:
  
  <select name="select_quote_status" id="select_quote_status" data-manager-id="7" class="input-md"><option value="">All</option>
    <option value="1">Pending</option>
    <option value="2">Approved</option>
  </select>
*/

// Use option:selected
$("#select_quote_status option:selected").val() // returns the value
$("#select_quote_status option:selected").text() // returns the text of the dropdown