I was amused by that the first time I noticed that jq was ignoring
some node types while dom surfing.

But quite nice when you want to get chldren tags, and not all the
stinkin' nodes (including text , and comments)

When I realized the difference, I just thought of jq dom surfing as
'gentleman's surfing'


Ⓙⓐⓚⓔ - יעקב   ʝǡǩȩ   ᎫᎪᏦᎬ

On 10/9/06, Falk Pauser <[EMAIL PROTECTED]> wrote:
> hi all!
>
> i wonder how i could do this using jquery's dom-traversing:
>
> in IE6 i do:
>
> 1. select one word in text with the mouse
> 2. get selection and create range
> 3. clone this range twice, collapse one copy to left and the other to right
> 4. insert span (id='left_boundary) at left, and span
> (id='right_boundary' at right
> 5. try $('#left_boundary').next()[0].nodeName, get "SPAN" -> it skips the text
>     but $('#left_boundary')[0].nextSibling.nodeName gives me "#TEXT_NODE"
>
> why cant i use jquery to access TEXT_NODES? or: what can i do to get it 
> working?
>
> --
> Falk
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to