According to the documentation, .contents() should "Find all the child
nodes inside the matched elements (including text nodes)".  However,
in the example given there, when the jquery
    $("p").contents().not("[nodeType=1]").wrap("<b/>")
is applied to the content
    <p>Hello <a href="http://ejohn.org/";>John</a>, how are you doing?</
p>
only the text "John" is made bold---in other words, jquery is failing
to select the text nodes containing "Hello" and ", how are you doing"

Since I would very much like to be able to select the text nodes, can
someone explain what is going on here?

Thanks
David

Reply via email to