Working with element[attribute$='value' - Attribute ends with

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 225
To select particular elements whose attribute value ends with certain characters,we can use attribute ends with selector.
<input id="txtName" type="text" data-id="txt Name" />
<input id="FirstName" type="text" data-id="name txt" />
<input id="Address" type="text" data-id="name txt" />
<input id="btnTest" type="button" value="Button" />

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

Comments or Responses

Login to post response