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

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

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

Comments or Responses

Login to post response