how to disable select option in jquery

This is kind of a strange thing to be doing but here's code that meets your requirements. $('select').on('change', function() { Disabled Option Select using jQuery Mobile

element? Normally, you will probably use the select helper. Explanation: If we want to remove all items from dropdown except the first item then we can use $ (#ddlItems should be disabled, or not. So after 6.00 am the option of 10.00 am should be disabled, after 6.30 am, the option of 10.00 am and 10.30 am should be disabled and so on.. I check this every second but you COULD set the timer to only check it AT the time boundary. how about add a click event on the select to disable the first option. Using attr () function loop over multiple items in a list? Here we discuss How to disable the checkbox in jQuery with examples along with the outputs. Remove Options To remove an option, you can use the remove () method of jQuery. To be able to disable/enable selects first of all your selects need an ID or class. How to disable HTML links using JavaScript / jQuery ?createAttribute () Method: This method creates an attribute with the defined name and returns the attribute as an attribute object. setAttribute () Method: This method adds the defined attribute to an element and gives it to the passed value. setAttributeNode () Method: This method adds the specified attribute node to an element. Use .remove () when you want to remove the element itself, as well as everything inside it. In addition to the elements themselves, all bound events and jQuery data associated with the elements are removed. To remove the elements without removing data and events, use .detach () instead.