Morning All,
Previously I have been using
$("#WebPartWPQ2 .ms-formtable tr:contains('lblName')> td").toggleClass('changedetails');
to customise a sharepoint list form, this has worked fine, (I have looked into alternative solutions to improve performance before but seem to achieve similar results)
Is there a selector for <nobr> in jquery
I have this working although I need it to match exactly rather than match if “contains”.
$("#WebPartWPQ2 .ms-formlabel nobr:contains('Change Owner')").toggleClass('changedetails');
Thanks in advance
Gary
You can combine it with
.filter()to check an exact match, like this:The
$.text()call is callingjQuery.textdirectly (calling Sizzle really), rather than making a new jQuery object for each<nobr>we’re checking.