[jQuery] Re: Wrap text between two divs

2009-04-07 Thread mkmanning
First, id's that are only (or begin with) numbers are invalid. You can work with text nodes in a limited way in jQuery using the contents() method. You could use contents() with filter() to achieve what you're after. //this will wrap any text between two divs (assumes your containing div has id

[jQuery] Re: Wrap text between two divs

2009-04-07 Thread FameR
Thanx a lot! On 7 апр, 06:34, "Jonathan Sharp, Out West Media" wrote: > jQuery doesn't select or operate on text nodes. Here's a plugin I wrote that > will capture the text node and wrap it: > > /*! >  * jQuery wrapNextTextNode Plugin v1.0 >  *http://outwestmedia.com/ >  */ > $.fn.wrapNextTextNo

[jQuery] Re: Wrap text between two divs

2009-04-06 Thread Jonathan Sharp, Out West Media
jQuery doesn't select or operate on text nodes. Here's a plugin I wrote that will capture the text node and wrap it: /*! * jQuery wrapNextTextNode Plugin v1.0 * http://outwestmedia.com/ */ $.fn.wrapNextTextNode = function(wrap) { return this.each(function() { var ns = this.nextSibli