Commit Graph

123 Commits

Author SHA1 Message Date
Yehuda Katz
4e27f17007 Landing in jQuery.contains, jQuery.fn.contains, and jQuery.fn.has support. Fixes #4101. 2009-12-09 12:43:13 -08:00
jeresig
39a77c2d02 Switched to using slice instead of join to get the correct results. 2009-12-04 12:36:24 -05:00
Ben Alman
2b481b93cf Landing Ben Alman's patch to add nextUntil, prevUntil, and parentsUntil. Also adds some tests for prevAll and nextAll, and fixes an test edge case in parents. 2009-12-04 12:28:47 -05:00
jeresig
c6a0211e57 Minor syntax changes to the winnow function. 2009-12-03 14:20:06 -05:00
jeresig
24e96ba22c Re-worked the closest no-duplicate-selector code again to be more efficient. 2009-12-03 11:14:10 -05:00
jeresig
525bb27bc0 Prevent duplicate selectors from having to match in closest. 2009-12-03 11:05:12 -05:00
jeresig
4daae7a79f No need to do the closest match if no selectors are passed in. 2009-12-03 10:51:04 -05:00
jeresig
e534a310c7 Added in the new .closest(Array) method, will be used to improve the performance of live filtering. 2009-12-02 19:05:51 -05:00
Karl Swedberg
255068da33 added missing semicolons 2009-11-28 04:09:14 +08:00
Karl Swedberg
ddb86f8d5b added curly braces around all if/else statements 2009-11-28 04:09:14 +08:00
Robert Katić
e03aee1aa6 Made the closest method evaluate the selector with appropriate context. 2009-11-09 12:39:29 +01:00
John Resig
76f6f0d39d Fixing spacing problems from rkatic's patches. 2009-11-07 17:40:47 +01:00
rkatic
0f03c7489f Store last closer value to jQuery.lastCloser instead of using data API. 2009-11-08 00:36:44 +08:00
John Resig
b0fe380cf8 Make .add() take an optional context and - if a context is specified in the root selector - use that as the base context. 2009-11-07 16:43:31 +01:00
John Resig
bbffc99f7c Moved a bunch of methods out of the jQuery-specific Sizzle code into more-appropriate files, in jQuery itself. 2009-10-26 18:07:57 -04:00
John Resig
67d445a703 A follow-up to [6578] (which stopped adding expandos to elements that didn't have data). That broke jQuery.unique() (so we're now using the unique from Sizzle). Using Sizzle's unique (which also sorts in document order) changed how add, andSelf, parents, nextAll, prevAll, and siblings work. after and before were changed to not use .add() (in order to guarantee their position in the jQuery set). Also, jQuery.data(elem) was updated to return that element's data object (instead of its ID).
$("<div/>").after("<span/>")
=> [ div, span ]
(calling after on a disconnected DOM node adds the nodes to the end of the jQuery set)

$("<div/>").before("<span/>")
=> [ span, div ]
(calling before on a disconnected DOM node adds the nodes to the beginning of the jQuery set)

$("div").add("span")
=> [ div, span, span, div, span ]
(results now come out in document order)

$("div").find("code").andSelf();
=> [ div, code, code ]
(results now come out in document order)

Same goes for .parents(), .nextAll(), .prevAll(), and .siblings().

Exception: .parents() will still return the results in reverse document order.

jQuery.data(elem)
=> { object of data }
(no longer returns the unique ID assigned to the node)
2009-09-25 17:55:20 +00:00
Yehuda Katz
9b20eb4c85 Make jQuery.winnow a local function 2009-09-15 00:35:35 +00:00
John Resig
9de120e6d7 Added support for .eq(-N), .first(), and .last(). Fixes #2164 and #4188. 2009-09-09 00:21:21 +00:00
John Resig
d6991fa273 Added support for .closest(filter, DOMElement). Fixes #4072. 2009-07-28 12:28:59 +00:00
John Resig
61b18c866c Backing out commit #6507 - causes too many problems. 2009-07-28 12:22:10 +00:00
John Resig
cae93c39eb Implemented support for .context limited .closest() calls. Fixes #4072. 2009-07-25 21:31:59 +00:00
Yehuda Katz
87869b8b81 Unify .not and .filter (resolves #4200).
- Both now support Function, Element, Selector, and Arrayish (including jQuery object)
2009-07-16 07:32:11 +00:00
Brandon Aaron
7c04a64016 breaking jquery out into smaller modules. added attributes.js, manipulation.js, and traversing.js 2009-03-18 21:15:38 +00:00