Selecting elements whose attribute value doesn't contain certain characters using jQuery.

Posted by Vishalneeraj-24503 under jQuery category on | Points: 40 | Views : 263
To find out all elements whose specific attribute value does not contain certain characters we can use "!=" operator.

<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" />

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

Comments or Responses

Login to post response