is there a straightforward method for searching within a div for a specific string and replacing it with another? I cannot use .replaceWith alone because there are other ele
Try this:
var foo = $('#foo').html(); foo = foo.replace('this string', 'this other string'); $('#foo').html(foo);
Fiddle: http://jsfiddle.net/maniator/w9GzF/