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

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -