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'; 

fiddle


Comments

Popular posts from this blog

Using 'OR' and 'AND' in SQL Server -

c++ - NetBeans Remote Development with additional configuration -

visual studio - TFS will not accept changes I've made to a Java project -