Please help selecting rel=”28700″ to change the <li> text:
<li id="pen_li_8" rel="28700"><span class="linkselectValue">Text to be changed</span></li>
I’ve tried the obvious:
$("li[rel='28700']").text('new text');
to no avail. Any ideas?
P.S. Sadly, selecting the ID or class, or editing the HTML, is not an option.
Your syntax is invalid, for one thing – you’re missing a closing
]. Also, if you want to change the text in the<span>, you need to select that, too. Here’s the selector you want: