Selecting elements based on their attribute value using jQuer.

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 256
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" />

<script>
$(function ()
{
$("input[type='text']").css("border", "1px solid blue");
});
</script>

Comments or Responses

Login to post response