Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82498

find and replace with jQuery

$
0
0
hi guys.. i have a question

i have an datatable field with this content (for example)
<td>One | Two | Three | Four | Six | Seven</td>
now i want to remove with jquery "Three |" with "nothing"

normally i do it with:
$('td').html($('td').html().replace('Three | ', ''));

You can see a working demo here: http://jsfiddle.net/a8pBG/

but it doesn't work with datatables.

any ideas to realize this?

regards berni


edit:

or another solution i can use

i have only whitespaces between every word.
<td>One Two Four Six Seven</td>

is it possible to add on column 3 a separator between all whitespaces?
(find " " and replace with " | ")

so my table looks like this
<td>One | Two | Four | Six | Seven</td>

Viewing all articles
Browse latest Browse all 82498

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>