nabrown78 wrote: > I am trying to select a list element that contains the text > "ladies’ short-sleeve tee". I have tried > > $("li:contains(ladies' short-sleeve tee)").addClass("selected"); > $("li:contains('ladies\' short-sleeve tee')").addClass("selected"); > $("li:contains(ladies’ short-sleeve tee)").addClass("selected"); > and > $("li:contains(ladies%27 short-sleeve tee)").addClass("selected"); > Try this (hope the apostrophe renders correctly when it gets to your end):
$('li:contains("ladies’ short-sleeve tee")').addClass("selected"); Explanation: ’ = ’ = ’ != '