You may want to check specific attribute for a value and find elements based upon that value. The [attribute=value] selector selects each element with the specified attribute and value. The selectedIndex property of the select list specifies the location of the selected option in the node list. Definition and Usage. jQuery provides a set of tools for matching a set of elements in a document which is formed from borrowing CSS 1-3. In the above attr() method example, When you click on button after that open a popup box with data-id and data-text attribute values. How to Open URL in New Tab using JavaScript ? How to set new value for an attribute using jQuery? Last Modified: 2012-05-08. Each