javascript - How to safetly replace the value after the "td" tag? (In JQuery) -
this question has answer here:
inside "td" tag, how replace "bmw" word after "span" tag without removing whole "span" tag script? (in jquery).
the word "bmw" wildcard wording. can "ford", "volvo", etc.
i'm using jquery version 2.0
$('#'....).??? <td> <span column="17" style="cursor:pointer"></span> bmw </td>
just use nextsibling if text node next sibling in question:
$('span[column="17"]').get(0).nextsibling.nodevalue = 'volvo';
Comments
Post a Comment