Reputation: 2765
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.
Upvotes: 1
Views: 1160
Reputation: 224904
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:
$('li[rel=28700] span').text('new text');
Upvotes: 3