jquery-replacetext icon indicating copy to clipboard operation
jquery-replacetext copied to clipboard

Handle adjacent text nodes?

Open cowboy opened this issue 15 years ago • 0 comments

Ideally, adjacent text nodes should be "collapsed" into a single text node. For example:

$('<div>foo<span>bar</span>baz</div>')
  .find('span')
    .remove()
    .end()
  .contents()
    .get(); // [ "foo", "baz" ]

cowboy avatar Jul 08 '10 14:07 cowboy