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>