In this post you can learn how to disable dropDown list item using jQuery
Suppose let’s assume the dropdown contains two items as: Audi, Mercedes
Here is the JQuery code to disable list item in the dropdown using jquery
$(document).ready(function() {
$("#DropdownListId option[value='1']").attr("disabled","disabled");
});

1 comments:
jQuery
jQuery Basics
Including the jQuery Library Code in an HTML Page Problem
Executing jQuery/JavaScript Coded After the DOM Has Loaded but Before Complete Page Load
Selecting DOM Elements Using Selectors and the jQuery Function
Selecting DOM Elements Within a Specified Context
Filtering a Wrapper Set of DOM Elements
Finding Descendant Elements Within the Currently Selected Wrapper Set
Returning to the Prior Selection Before a Destructive Change
Including the Previous Selection with the Current Selection
Post a Comment