Selecting elements based on their attribute value using jQuer.

Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 151
To select all elements based on their specific attribute value,we can use attribute selector in jQuery.
For Example:-
<input id="txtName" type="text" data-id="txt Name" />
<input id="FirstNameF" type="text" data-id="name txt" />
<input type="button" value="Button" id="btnTest" />

$(function ()
$("input[type='text']").css("border", "1px solid blue");

Comments or Responses

Login to post response