jeresig
1d2b1a57da
Added in jQuery.proxy(obj, name), like the method described in Secrets of the JavaScript Ninja and in Dojo's Hitch, and added in some unit tests.
2009-12-31 15:17:52 -05:00
jeresig
c05712f0a5
Fixed the spacing from the last commit.
2009-12-18 12:43:35 -05:00
jeresig
d40083c866
Disabled the passthrough .attr(method_name) functionality. You can now use it if you do: .attr({method_name: value}, true) OR as an easy initialization method: jQuery('<div/>', {html: '...', id: 'test'}).
2009-12-18 12:41:53 -05:00
Robert Katic
148fb7ba8e
Made isPlainObject() supporting null, undefined, and window values on IE too. Also added some related tests. Fixes #5669 .
2009-12-19 01:19:34 +08:00
John Resig
65ebf57c1e
Make sure that dynamically-created elements don't have a parent. Fixes #5638 .
2009-12-10 17:01:04 -08:00
John Resig
474d814076
Moved some methods around inbetween core.js and traversing.js. Core methods shouldn't rely upon other modules (e.g. the selector engine) wherever possible.
2009-12-10 09:25:25 -08:00
John Resig
715d1c5a30
Rewrote .merge() (faster and less obtuse now). Fixed #5610 .
2009-12-09 21:43:20 -08:00
John Resig
04524287d3
Switched jQuery() to represent jQuery([]) instead of jQuery(document).
2009-12-09 20:36:07 -08:00
John Resig
87ba780c69
Renamed isObjectLiteral to isPlainObject (makes more sense, per the suggestion of Michael Geary).
2009-12-06 17:11:51 -05:00
jeresig
b8d0c0711f
Added some isObjectLiteral tests.
2009-12-02 14:57:13 -05:00
Yehuda Katz
17955cacf4
Fixes $.trim for closes #4980
2009-11-30 10:22:18 -08:00
Robert Katic
ac00fe5bbb
Generic jQuery.merge and safer jQuery.makeArray(nodeList).
...
* Made jQuery.marge more generic supporting null and undefined values, and supporting array like objects as results. Fixes #5527 .
* Made jQuery.makeArray(nodeList) more safer using jQuery.merge internally. Fixes #5528 .
* Added a second "results" argument to jQuery.makeArray for internal usage to avoid intermediary arrays in init.
2009-11-26 00:56:49 +08:00
Robert Katic
ee9192d103
Corrected some minor errors made by me (rkatic) in last commits.
2009-11-13 08:09:46 +08:00
Robert Katic
7b26e3bcc8
Forgotten to update the number of jQuery.extend related tests.
2009-11-12 21:59:48 +08:00
Robert Katic
93be758de9
Made jQuery.extend(true, ...) to extend recursively only 'object literal' values.
2009-11-12 21:59:47 +08:00
Robert Katic
990d9ca1b0
Made isObjectLiteral to work correctly with custom objects with empty prototypes.
2009-11-12 21:59:47 +08:00
John Resig
c4c820efff
Made jQuery('<div/>') and jQuery('<div></div>') use the same code path (making the second one faster). Fixes #5293 .
2009-11-11 13:49:29 -05:00
rkatic
b256a3a266
Added a method to myKlass.
...
If an object's prototype is "empty", then isObject returns true!
2009-11-09 19:32:24 +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
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
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
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
569c8b45c0
Fixed a bug with the isXMLDoc test - also made sure that isXMLDoc was handling the case where documentElement is undefined (which only occurs on HTML documents in IE).
2009-08-27 20:07:45 +00:00
John Resig
957cd6fb2a
Tweaked the isXMLDoc iframe test case to test the document, not the body element (which doesn't exist in IE). Also made the isXMLDoc code handle cases where elem is null, undefined, etc.
2009-08-27 19:22:48 +00:00
John Resig
18a6fbbb6a
Added an improvement to quickExpr and some more tests for jQuery('html'). Fixes #4979 .
2009-07-27 20:47:32 +00:00
John Resig
2cd9ee3510
Added an extra documentElement check to isXMLDoc for IE - and added a number of unit tests for isXMLDoc. Fixes #4833 .
2009-07-27 13:02:41 +00:00
Yehuda Katz
1a7f72e7fe
Add test for jQuery(jQueryObj) cloning and simplify new get() code
2009-07-17 17:33:44 +00:00
Ariel Flesler
a38a5cd531
jquery core: Simplifying isEmptyObject() and adding tests.
2009-07-16 15:16:44 +00:00
Yehuda Katz
8e54b167cf
Add a test for index()
2009-07-16 07:32:17 +00:00
Yehuda Katz
c10f87120f
jQuery.extend(true, Object, Object) copies custom objects correctly.
...
- Also update jQuery.isObject to handle this case correctly
2009-07-16 07:32:03 +00:00
Yehuda Katz
8d52c27808
jQuery.extend(true, Object, Object) copies objects with length keys correctly
2009-07-16 07:31:55 +00:00
Yehuda Katz
6b912beb7b
Clear some dangling whitespace
2009-07-16 07:31:47 +00:00
Yehuda Katz
e532dfe522
Add support for .get(-Number) Closes #4188
2009-07-16 07:31:41 +00:00
Yehuda Katz
e124fec5e9
Make toArray an alias for .get(). Closes #3999
2009-07-16 07:31:32 +00:00
Ariel Flesler
c6b9654ea8
jquery core: Closes #2827 . jQuery.each iterates over functions
2009-06-20 15:51:19 +00:00
Brandon Aaron
c41fab1eb0
another unit test for index method
2009-05-07 16:59:35 +00:00
Ariel Flesler
c6b59263b5
testrunner: Updating an orphaned test
2009-05-03 17:02:56 +00:00
Ariel Flesler
3a80de1c7a
jquery core: $() -> $(document) and $(undefined) -> $([]). Removed a duplicated block.
2009-05-03 15:57:25 +00:00
Brandon Aaron
d415e0adb8
actually should be 6330, not 6329
2009-05-02 19:23:53 +00:00
Brandon Aaron
ffd457d456
index now works in reverse when passed a selector or undefined. fixes #3971
2009-05-02 19:22:55 +00:00
John Resig
2764127335
Unified the formatting of core.js. === or !== are used wherever appropriate, syntax has been normalized, braces are added in all cases, and jQuery() now returns an empty set.
2009-03-31 17:35:20 +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
Brandon Aaron
e73990a566
fix for #3688 , setting type attribute on button causes IE to throw error
2009-03-17 22:27:25 +00:00
John Resig
f1f5cd9f6a
Simplified the structure of the .css() and .attr() methods (reducing the number of calls). Need to optimize $.css/$.curCSS/$.attr still. Fixes #4269 .
2009-02-28 20:23:48 +00:00
John Resig
a37ca9e905
Made sure that .remove now uses multiFilter. Fixes bug #4205 .
2009-02-20 19:45:29 +00:00
John Resig
481171a3f8
Fixed some tests that were changed (fixed!) by fixing #3966 .
2009-02-18 19:59:51 +00:00
John Resig
75a973da35
Made it so that appendTo, etc. return the inserted elements (thus using pushStack, as well). Fixes bugs #3966 and #4182 .
2009-02-18 16:29:43 +00:00
John Resig
1ac087f6f9
Updated the show() tests to work without the use of jQuery.browser (the test suite now passes 100% in IE8).
2009-02-17 22:22:05 +00:00
John Resig
b536d2ac67
Reorganized and disabled some of the height/width tests. Need to look in to better abornormal-padding/margin/border support at some point.
2009-02-17 22:15:42 +00:00
John Resig
4a4d049df9
Made the div showing a little more explicit - making sure that it doesn't affect the fx tests.
2009-02-17 16:22:41 +00:00
John Resig
f89f5eb61f
Reorganized some of the animation tests to work with the new hide/show changes.
2009-02-17 15:54:27 +00:00
John Resig
10ab08de43
Fixed some more CSS/visibility tests.
2009-02-17 14:08:11 +00:00
John Resig
ad7577a084
Changed a bunch of the DOM tests to work in Document Order.
2009-02-17 14:05:25 +00:00
John Resig
6bd6a4e059
Updated some of the display/visible/hidden tests to work on an appropriate element.
2009-02-17 13:57:28 +00:00
John Resig
ce90accc58
Reworked the .clone() function in IE. Fixes jQuery bugs #3500 (jQuery expandos were causing extra elements to appear from using .html() cloning), #3254 (Mis-match in clone result length causes problem), and #2845 (Cloning an <object/> causes exceptions to be thrown).
2009-02-09 14:48:15 +00:00
John Resig
cd28922b78
Made sure that .removeClass(null) doesn't throw an exception. Fixes #3847 .
2009-01-20 17:33:25 +00:00
John Resig
28a1f02223
Re-worked the logic for where .selector and .context are added for ID selectors (especially ones that aren't found). Fixes jQuery bug #3833 .
2009-01-20 16:00:48 +00:00
John Resig
4e7d565e50
Added two more tweaks for XHTML core tests.
2009-01-19 23:33:46 +00:00
John Resig
9db710a156
Made some tweaks to the core tests so that they'll run better under XHTML.
2009-01-19 23:22:25 +00:00
John Resig
96152559e0
Landing a fix for non-link anchor tabIndex (from scott.gonzalez). Fixes ticket #3916 .
2009-01-19 21:40:23 +00:00
John Resig
ea78377760
Only try to wrap the element if it's not disconnected, fixed #3828 .
2009-01-12 14:07:14 +00:00
John Resig
0c97178553
Fixed an issue with parentNode being accessed in attr() on disconnected DOM elements.
2009-01-12 14:00:35 +00:00
John Resig
73ff49ac9a
Prevented non-script <script> blocks from executing, fixing #3733 .
2009-01-11 19:33:01 +00:00
John Resig
0066ba3f82
.closest() with positional selectors wasn't worked as expected.
2009-01-10 20:30:03 +00:00
John Resig
29bf601f34
Fixed an issue with script nodes being removed incorrectly, fixes #3737 .
2009-01-10 01:07:59 +00:00
Ariel Flesler
d62875fb01
testrunner: Removing every global variable leaked within (and outside) tests. Some were deleted and some saved within the jQuery namespace.
2009-01-09 23:49:18 +00:00
John Resig
c6f189ac73
Selector state wasn't being passed along on a cloned jQuery object.
2009-01-08 21:41:58 +00:00
Scott González
49d0d5b7a3
Fixed tabindex normalization so that elements that natively support tabbing, but don't have a tabindex explicitly set return 0 instead of undefined.
...
Removed jQuery.support.tabindex since we're only normalizing non-XML right now and all browsers support tabIndex for HTML documents.
2009-01-07 14:36:30 +00:00
John Resig
d3141dcdba
Simplified the XML clone test.
2009-01-05 21:56:35 +00:00
John Resig
c6de039bb1
Simplified the XML selector test (save the result).
2009-01-05 21:04:15 +00:00
John Resig
122b672f70
Landed cross-browser support for tabIndex, by Scott, closes ticket #3649 .
2009-01-05 17:34:42 +00:00
John Resig
4694e537bc
Forgot to merge in some of the new tests from Sizzle.
2009-01-05 01:24:14 +00:00
John Resig
c0294278db
Landed a proper fix for #3255 - which involves doing createElement instead of going through the normal clean method.
2009-01-03 00:51:07 +00:00
John Resig
d20e7fede1
Disabled testing of em-defined borders, need to look back into this issue.
2009-01-02 19:25:54 +00:00
John Resig
c59bf424a1
The exact escaping of the text() test isn't important - as long as < is escaped.
2009-01-02 19:23:12 +00:00
John Resig
6a3d1a1e28
Fixed an issue with .not("#foo, bar") not working correctly, closes #3757 .
2008-12-31 19:21:24 +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
Ariel Flesler
0a8f96ac3d
jquery core: Closes #1681 . jQuery.fn.toggleClass can accept a boolean argument indicating add/remove.
2008-12-25 20:12:18 +00:00
Ariel Flesler
0e3e470edc
jquery core: Closes #3255 . The div used in jQuery.clean is emptied in the end. Cleaning the parentNode's properties of the elements.
2008-12-25 19:47:56 +00:00
Ariel Flesler
4b25b147ab
jquery core: Closes #3641 . jQuery.merge stopped looping once a 0 was found.
2008-12-25 19:25:30 +00:00
John Resig
6b09032864
Added support for the new .closest() method (very useful for event delegation).
2008-12-22 00:52:53 +00:00
John Resig
c85243dfc4
Landing the new Sizzle selector engine. There'll need to be some later tweaks (to make the tests a little more pragmatic - especially for document order elements). But it appears to be passing well and that's enough. Closes #3563 .
2008-12-20 01:19:17 +00:00
John Resig
46ee77bcc3
Fixed line-ending issue.
2008-12-19 05:43:37 +00:00
John Resig
3963fcb30d
Tweaked mis-numbered makeArray test.
2008-12-19 05:42:15 +00:00
John Resig
132b8de614
Switched to using DOM Fragments in domManip.
2008-12-19 04:37:54 +00:00
John Resig
2875460f63
Added selector path logging (creates a trail that plugins can use).
2008-12-19 04:37:10 +00:00
Ariel Flesler
e611289a79
testrunner: re adding the test for a function within isFunction.
2008-12-16 00:05:04 +00:00
Ariel Flesler
96e8f355da
testrunner: fixing tests that were broken due to recent updates to qunit.
2008-10-18 21:59:09 +00:00
Ariel Flesler
1023cf1d72
jquery core: closes #3248 , #3079 , #3026 , #3176 , #3202 , #3129 . jQuery.makeArray doesn't support functions anymore. Voiding the conflict with Scriptaculous 1.7.x.
2008-08-12 19:34:30 +00:00
Ariel Flesler
a27b5d0468
jquery core: closes #2652 . val() supports option elements, also simplified the code.
2008-07-23 17:00:32 +00:00
Ariel Flesler
69212c501f
jquery core: closes #2968 . Simplified isFunction, dropping support for DOM methods and functions like alert() on IE.
2008-07-23 16:18:05 +00:00
Ariel Flesler
28937ded0e
test runner: optimizing a test for speed.
2008-07-01 02:08:45 +00:00
Ariel Flesler
a23e4361fc
test runner: recloses #3102 . Adding one test for $().eq("1")
2008-07-01 02:05:46 +00:00
Ariel Flesler
21d669135d
test runner: 2 tests for [5728].
2008-06-17 19:59:16 +00:00
Ariel Flesler
1e9593646f
test runner: adding 2 tests for .val( Number ).
...
Removed a silly test.
2008-05-29 00:03:45 +00:00
Ariel Flesler
9e48649729
test runner: the changes are:
...
- Replaced all the $ for jQuery in the tests and suite.
- Added a noConflict to testrunner.js.
- Modified the test for noConflict() so that it still work.
- Added jQuery 1.2.1 and 1.2.3 to otherlibs.
2008-05-28 23:18:25 +00:00
Ariel Flesler
3c5c3dffaa
test runner: A test was failing on Opera 9.50. Not a bug, just made the test less specific and it passed.
2008-05-24 21:27:12 +00:00
Ariel Flesler
0e63c789e3
test runner: adding more tests for attr(). Related to [5574] and [5683].
2008-05-24 18:11:55 +00:00
Ariel Flesler
1382ea8d98
test runner: improved the shown message of 4 isFunction tests.
2008-05-14 21:18:46 +00:00