Bug Tracker

Ticket #3329 (new bug)

Opened 4 months ago

Selectors don't work with jQuery context

Reported by: bartt Assigned to: anonymous
Type: bug Priority: major
Milestone: 1.3 Component: core
Version: 1.2.6 Keywords: context
Cc: Needs: Review

Description

Many (if not all) selectors don't work with jQuery context. See the demo on http://docs.jquery.com/Ajax/load#urldatacallback for example.

Other forms such as jQuery("#me", jQuery("<div id='notme'>notme</div> <div id='me'>ME!</div>") also fail. Same for jQuery("<div id='notme'>notme</div> <div id='me'>ME!</div>").find("#me").

It seems to be caused by the lack of nodeType in jQuery objects. Selectors that take context arguments check the nodeType to make sure they received an Element or Document type.

Attachments

Note: See TracTickets for help on using tickets.