Saturday, 2 December 2017

Jquery Drop Down Menu Operation

Jquery Drop Down Menu Operation

Reset Drop Down List :

Syntax : 

  $('Your drop Down ID').prop('selectedIndex', 0);

E.g.

  $('#ddlServiceName').prop('selectedIndex', 0);

Get Select data using value attribute

Syntax :
$("#DropDownID option[value=Option Value]").text();

E.g.

$("#drpPrice option[value=1]").text();