Commit graph

33 commits

Author SHA1 Message Date
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 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 098a2bb4d0 Fixed the cleaning method to support namespaced elements. Thanks to einaros for the patch recommendation. Fixes #5358. 2009-10-12 16:26:01 +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
John Resig fc4c691534 Adding some fixes for commit [6537]. If there's leading whitespace, or if an exception is thrown by innerHTML, we need to use the old style method. 2009-09-15 16:46:15 +00:00
John Resig 7638fc5835 Fix for SVN rev [6537]. Events weren't being unbound correctly in Internet Explorer (cleanData wasn't handling malformed NodeList results correctly). 2009-09-15 15:56:18 +00:00
John Resig 3eb56b09b8 Another fix for [6537] - make sure that .innerHTML isn't used on non-HTML documents and that we only attempt to use .innerHTML on DOM Elements. 2009-09-14 23:20:23 +00:00
John Resig 766635e862 Fixed a bug introduced in SVN rev [6537] that caused XML-based fragment creation to fail, in IE. 2009-09-14 23:12:06 +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
Ariel Flesler 0790989eb6 jquery core: Fixed #5202. Fixing selector generation when a manipulation function receives a jQuery object. 2009-09-14 18:03:18 +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
John Resig 9d8d74569c Split out the fragment-building code from domManip. Switched core.js to using that instead. Also moved the standalone tag detection to $(...) for performance. 2009-09-07 18:58:01 +00:00
John Resig 7e06b9b70f Tweaked the detach addition in commit [6474]. 2009-07-21 15:57:51 +00:00
Yehuda Katz 7a67f8897d Adds detach() 2009-07-21 09:17:33 +00:00
John Resig 7175b2ffab Removing extraneous closing ). Fix for [6463]. 2009-07-19 16:21:08 +00:00
John Resig f57d93bf18 Move cases of .replace(re, Function) out from inline (to avoid being redeclared on every use). Fixes #4114. 2009-07-19 15:57:43 +00:00
John Resig 0ac9898d6b Fixed typo in commit #6461. 2009-07-19 15:51:00 +00:00
John Resig 6d23f2fd81 Made more formatting changes to manipulation.js. Also moved all inline RegExp into a top declaration. 2009-07-19 15:48:30 +00:00
John Resig ec7fdf3723 Tweaked formatting of src/manipulation.js. 2009-07-19 15:29:03 +00:00
John Resig 0d5c3a68a0 Standardizing on .test() and .exec() - moving away from using .match() for RegExp. Fixes jQuery bug #4113. 2009-07-19 13:21:51 +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 5b84c7c45c IE doesn't seem to like caching fragments that have options in them. Ticket #4883. 2009-07-11 15:23:18 +00:00
John Resig 0c4418bbc4 Limit domManip caching to strings < 512 characters long. Ticket #4883. 2009-07-11 14:50:59 +00:00
John Resig 8db967e9d5 Added caching to domManip. Fixes #4883. 2009-07-11 13:49:46 +00:00
Brandon Aaron 4a99fcf6e4 fix remove and empty to work properly in IE when an element with the id of length exists. fixes ajax event hanlders in test suite from firing multiple times because they did not get cleaned up. 2009-05-16 19:32:16 +00:00
Brandon Aaron f8ef75eb91 remove trailing spaces 2009-03-23 01:55:17 +00:00
Brandon Aaron 9476530fa1 moving some vars from manipulations.js to attributes.js 2009-03-22 15:06:58 +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