I've updated the docs so one exemple that used the unsuported attibute
selector and could lead to missunderstandings:

URL:             http://docs.jquery.com/Traversing/contents
Before edit:  $("p").contents().not("[nodeType=1]").wrap("<b/>");
After edit:     $("p").contents().filter(function(){ return
this.nodeType != 1; }).wrap("<b/>");

But the old example it's also in the API browser: 
http://api.jquery.com/?contents

Off-topic: The API browser is awesome, I've found out that the link
above works great but it's not hinted on the API browser homepage.
IMHO a little improovement could be made: If the search returns only 1
result during page load, the API 'clicks' that function.

--
Iraê

On Jan 31, 4:57 pm, John Resig <[email protected]> wrote:
> Just to clarify: Attribute selectors still exist. We just no longer do
> attribute selectors against non-DOM elements (such as text nodes, or
> comments). Thus the filter that you specified no longer works. You can
> use a custom filter instead.
>
> .filter(function(){ return this.nodeType == 3; })
>
> --John
>
> On Sat, Jan 31, 2009 at 11:44 AM, Jed Schmidt <[email protected]> wrote:
>
> > Ah, I guess I missed that. I think Yehuda's attributed events post
> > might have given me the impression that the attribute syntax was still
> > around.
>
> > Thanks much,
>
> > Jed Schmidt
>
> > On Jan 31, 9:42 am, John Resig <[email protected]> wrote:
> >> Yeah, there was a discussion on this previously - support for that
> >> undocumented feature was removed in 1.3.
>
> >> --John
>
> >> 2009/1/30 Jed Schmidt <[email protected]>:
>
> >> > Hey all,
>
> >> > Nice meeting you guys at Kilowatt yesterday.
>
> >> > I seem to have run across a bug in 1.3.1:
>
> >> > $("<span>abc</span>").contents().is("[nodeType=3]")
>
> >> > returns true as expected, but
>
> >> > $("<span>abc</span>").contents().filter("[nodeType=3]").length == 1
>
> >> > returns false, due to a nodeType === 1 check in $.fn.filter but not in
> >> > $.fn.is.
>
> >> > Is there a need for this check that can't be handled in the selector
> >> > engine itself?
>
> >> > Jed Schmidt
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to