Compare this selector with the Attribute Contains Word selector (e.g. An easier solution has been outlined here: Validate select box Make the value be empty and add the required attribute <select id="select" class="required"> <option value="">Choose an option</option> <option value="option1">Option1</option> <option value="option2">Option2</option> <option value="option3">Option3</option> </select> Share Follow The event handler can be bound to the text input: Now when any portion of the text is selected, the alert is displayed. jQuery selectors are used to "find" (or select) HTML elements based on their name, id, classes, types, attributes, values of attributes and much more. Select All Element If you want to apply a script to all HTML elements in one go, you can use the (*) selector. how to keep spiders away home remedies hfx wanderers fc - york united fc how to parry melania elden ring. 503), Mobile app infrastructure being decommissioned, How to filter inputs fields in a particular div. jQuery :submit Selector Selects Input Type Submit Element If the button is created using the input element in the form. Below are the various selectors you can use to select and manipulate an HTML element. This event is limited to fields and