Commit graph

80 commits

Author SHA1 Message Date
jeresig 1e64d58183 Make sure that the correct value is being pulled from checkboxes in Webkit. Fixes #5699. 2009-12-22 02:00:46 -05:00
jeresig f298cce100 Made sure that the .val() logic for setting radios and checkboxes was correct. Fixes #5698. 2009-12-22 01:18:49 -05:00
jeresig 261b7efb5f Fixed the issue where getting an empty value was impossible. Fixes #5697. 2009-12-22 00:24:23 -05:00
Yehuda Katz 1a4d1904ae Fix up whitespace and a couple of glitches. 2009-12-09 21:17:10 -08:00
Yehuda Katz da51cd0e43 Add function values to addClass, removeClass, toggleClass, text, and removeAttr 2009-12-09 20:57:53 -08:00
John Resig 4b70f006f5 Made .clone(true) also copy over element data. Fixes #4191. 2009-12-09 13:28:58 -08:00
John Resig f5b649fafb Make sure that events are cloned for wrap, fixes #2977. 2009-12-08 11:21:24 -08:00
John Resig 2092789155 Added in support for injecting area elements into map elements. Fixes #4484. 2009-12-06 17:26:39 -08:00
Dave Methvin 628e1564c4 Fix for #4011, crash when two text nodes are appended in IE. 2009-12-06 10:31:57 +08:00
jeresig 2a6de9ab66 Make sure that the previous element is removed from the page before the next is inserted, in replaceWith. Using a variation of the patch by snaury. Fixes #2697. 2009-12-05 15:30:36 -05:00
jeresig bfc15b57ef Removed debug statements from manipulation tests, was causing errors in IE. 2009-12-02 15:14:48 -05:00
Yehuda Katz e277e6ed21 Adding a test that a new option can be selected with val(N) 2009-12-01 14:11:32 -08:00
jeresig 1a26e41917 Use .add() to merge two test groups together for .unwrap(). 2009-11-30 14:39:34 -05:00
jeresig c7407bd4fc Fixed wrap test that was looking for comment values from .text(). 2009-11-30 13:46:14 -05:00
John Resig b30af34f28 Added support for .text() on text nodes. Fixes #5525. 2009-11-17 14:52:08 -05:00
John Resig 7c4144fab3 Fixed the case where HTML that contained entities was being inserted as text strings instead of HTML. Thanks to dmethvin for the test case! Fixes #5483. 2009-11-11 14:23:56 -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 69e6e53555 Adding in .unwrap() support, thanks to Ben Alman! Fixes #5191. 2009-09-25 21:41:21 +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
Jörn Zaefferer f55fb36e54 remove globals in tests for compability with ?noglobals, to be enabled by default 2009-09-15 17:51:38 +00:00
John Resig 173c1477ae Added support for .before(), .after(), and .replaceWith() on disconnected DOM nodes. Fixes bug #3940. 2009-09-14 22:09:42 +00:00
Brandon Aaron b539b6e1d9 remove and detach unit tests were not cleaning up, causing selector tests to fail 2009-09-14 20:45:58 +00:00
John Resig 520f1a2684 Broke the logic for .clean() wrap out into a separate, static, data structure. Also improved the performance of .html() looking for the case where .innerHTML can be used without problems. Also tweaked some cases where cleanData() was used, no need to use jQuery selectors in these cases. 2009-09-07 20:55:36 +00:00
Yehuda Katz 7a67f8897d Adds detach() 2009-07-21 09:17:33 +00:00
John Resig 7a04d1da54 We only support wrapping the first element around an element (all others are ignored). Fixes ticket #4903. 2009-07-14 23:43:58 +00:00
John Resig 991dafae16 Fixed wrapping of elements that hold text nodes. Thanks to David Flanagan for the patch. Fixes #4902. 2009-07-14 23:28:07 +00:00
Yehuda Katz 3595102154 Add tests for replaceAll(fn) and wrap(fn) -- mark wrapAll and wrapWithin as TODO 2009-07-12 21:08:54 +00:00
Yehuda Katz 7d7a960035 Support for .foo(Function) and testing. TODO: More tests 2009-07-12 20:19:43 +00:00
John Resig 4130319e97 Added explicit module names to the new unit tests. 2009-04-20 17:05:18 +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