- Add JQuerify bookmarklet to this page. (Get JQuerify here)
- $("#lnkRedAttributeContains").click(showRedContains);
- $("#lnkYellowAttributeContains").click(showYellowContains);
To find an element with an id of 'HelloGoodbyeAttributeContains'
click me yellow
click me red
click me yellow
click me red
The click me red also finds the two links as their ids match the predicate. The click me yellow is specifically looking for div elements therefore the two links are not turned yellow.
JQuery Predicate, attribute Contains
$("[ @id *= 'ributeCont' ]").removeClass("YellowAttributeContains").addClass("RedAttributeContains");
$("div[ @id *= 'ributeCont']").removeClass("RedAttributeContains").addClass("YellowAttributeContains");