Commit graph

12 commits

Author SHA1 Message Date
jeresig bbd933cbfe Added in the .delay() method for delaying the execution of queued functions and animations. 2009-12-04 12:06:47 -05:00
Mark Gibson ef819c91b9 Fixing endlines. 2009-11-25 12:09:53 -05:00
John Resig 4bda398e6a Switched from using QUnit's isObj/isSet to the more robust same method. 2009-09-29 19:49:43 +00: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
Brandon Aaron 97e134fe80 data should not add expando unless actually adding data 2009-09-15 21:14:08 +00:00
Ariel Flesler a273120291 jquery data: closes #5224. Exposing the expando. 2009-09-14 22:34:04 +00:00
Yehuda Katz 991d039b62 Refactor queueing system to allow auto-dequeuing to use dequeue directly and
therefore require dequeue to always leave the element it has dequeued on
the queue.

  - In the fx queue, a progress sentinel is added when a queue element
    is dequeued.
  - The sentinel is ignored when dequeue is called explicitly
  - When adding a new element to the fx queue, queue() checks if
    the progress sentinel is present. If not, it calls dequeue()
2009-07-16 07:32:39 +00:00
Yehuda Katz d36d224cc5 Implemented .data() to get the entire data object. Closes #4284 2009-07-16 07:32:25 +00:00
Yehuda Katz 89dc1e0143 clearQueue and next should now work with default fx on all browsers 2009-07-13 22:21:40 +00:00
Yehuda Katz d857315967 Add clearQueue for clearing non-fx queues 2009-07-12 15:14:01 +00:00
Yehuda Katz 89b4bc53ca Added a next() shortcut for queues 2009-07-12 14:31:32 +00:00
Ariel Flesler 4afa608351 jquery data: Closes #3539. Exposed jQuery.queue. Moved all the data and queue functions to their own module. Made the dequeue function more generic(designed to be used on functions). Closes #3748. Reverted a previous modification. 2008-12-30 02:31:26 +00:00