John Resig
983548f8eb
Make sure that if an additional load event is triggered (such as an iframe being dynamically injected in DOM ready) the ready event isn't triggered twice. Fixes #7352 .
2010-11-09 13:44:06 -05:00
John Resig
fb48ae8e6c
Make sure that when multiple variables are being declared that assignments are each done on their own line.
2010-11-09 11:09:07 -05:00
jeresig
3df41db036
Make sure that the ready event doesn't double-fire when .bind(ready) is used. Fixes #7247 .
2010-10-22 00:08:34 -04:00
John Resig
a7d0b0b9e8
Var wasn't being explicitly declared. Fixes #7226 .
2010-10-17 10:58:01 -04:00
jeresig
0be7f4eb4f
Make sure that opacity is being reset properly on a show animation. Additionally expose jQuery.isNaN from the data module.
2010-09-27 11:51:01 -04:00
jeresig
e0a9615f82
Make sure that the body element exists before doing the body selector optimization. Fixes #6529 .
2010-09-24 15:53:38 -04:00
jeresig
a220c81eb9
Increase the speed of the single setTimeout calls for the ready event.
2010-09-24 10:06:36 -04:00
jeresig
6dfdb14753
Merge branch 'master' of github.com:jquery/jquery
2010-09-23 12:09:49 -04:00
Robert Katic
484cc6e220
Made jQuery.type more consistent with host objects.
2010-09-23 12:08:41 -04:00
Robert Katic
694b625c92
Ensured that arrays are not considered same as plain object on deep extending. Fixes #5991 .
2010-09-23 12:07:06 -04:00
jeresig
e270d804b4
Delay the result of the readyState check to give scripts the opportunity to delay ready, as described by @jrburke in 747ba7defd
.
2010-09-23 11:38:22 -04:00
jeresig
d7a6e75241
Add some tests for jQuery.isWindow and make sure that we're operating against an object before testing.
2010-09-22 16:50:38 -04:00
jeresig
c8dd49f756
Unify the means of detecting a window across the library. Fixes jQuery UI bug #5438 and jQuery bugs #6575 and 6088.
2010-09-22 16:41:51 -04:00
jeresig
8e1d369710
Some minor lint fixes for the RegExp.
2010-09-22 09:46:21 -04:00
jeresig
9dc6e0c572
Applied the RegExp issues reported by Jeff Robinson here: http://jmrware.com/articles/2010/jqueryregex/jQueryRegexes.html Additionally broke out all remaining inline RegExp. Fixes #7062 .
2010-09-22 09:16:28 -04:00
jeresig
19b5d9e874
Re-work the document scoping.
2010-09-22 08:08:45 -04:00
John Resig
1ac3713e7f
Fix bug with the readyWait DOM ready addition.
2010-09-21 16:26:36 -04:00
John Resig
747ba7defd
Allow plugins to delay the exeuction of the ready event. Delay the ready event by calling: jQuery.readyWait++ and force the event to fire by doing: jQuery.ready(true). Fixes #6781 .
2010-09-20 14:53:29 -04:00
jeresig
492a2e2c53
Wrap the core return in parens to fix a confused JSLint.
2010-09-14 09:57:26 -04:00
jeresig
2663041924
Make sure that jQuery is being exposed outside of core (this will be stripped during the build process). Follow-up to #7011 .
2010-09-09 08:23:10 -04:00
jeresig
acb162a697
Make sure that the removeEvent and buildFragment private functions are exposed (to help with access across modules). The final API for each of these is very much in flux and will likely change before the final release. Fixes #7011 .
2010-09-08 18:13:35 -04:00
John Resig
13f27fcd05
Switched to use 'in' for the setInterval/window check as it also skirts around the Safari 2 NodeList crasher. See the discussion in 94f35d0519
for more details.
2010-08-27 18:17:07 -04:00
John Resig
1ead20c2ed
Blackberry 4.6 is capable of finding elements that are no longer in the DOM via getElementById. It only appears to happen when the node has been inside of a cloned Document Fragment. Fixes #6963 .
2010-08-27 15:14:30 -04:00
John Resig
ea8b1584b1
Use the native isArray whenever possible. See perf test by jdalton here: http://jsperf.com/isarray-vs-other Fixes #6825 .
2010-08-27 13:15:48 -04:00
John Resig
7f18d29287
Simplify the logic in $.type, thanks to jdalton for the suggesiton in 5d2be7e299
.
2010-08-27 07:03:30 -07:00
John Resig
5d2be7e299
Added some tweaks to $.type to handle null and undefined. Added a bunch of unit tests as well.
2010-08-27 06:10:52 -07:00
John Resig
94f35d0519
Adding in a jQuery.type(obj) method (a simple map to using Object.prototype.toString.call). Fixes #3330 .
2010-08-25 09:57:34 -07:00
John Resig
18dad47489
Tweaked logic for working around Blackberry 4.7 makeArray(RegExp) issue. Fixes #6930 .
2010-08-25 09:27:30 -07:00
John Resig
396dd21273
Fixing getting/setting classes and makeArray(RegExp) for Blackberry 4.7. Fixes #6930 , #6931 .
2010-08-23 12:38:55 -07:00
jeresig
8effe3a7de
Made it so that you no longer need to build jQuery in order to run the test suite (but you'll still need a checkout of QUnit and Sizzle, at least).
2010-03-23 12:12:16 -04:00
jeresig
ba8938d444
Switch to using String.prototype.trim from String.trim as it's more-widely available.
2010-03-11 10:49:19 -05:00
jeresig
141ad3c3e2
Landing a faster trim method. Based upon the work by Travis Hardiman and DBJDBJ. More details here: http://forum.jquery.com/topic/faster-jquery-trim Fixes #2279 , #4452 , and #4835 .
2010-03-09 09:14:27 -05:00
jeresig
dcf0fa5048
More changes to get jQuery in line with JSLint.
2010-03-01 21:24:49 -05:00
jeresig
a4043cdcbf
Land some additional tweaks related to running through JSLint.
2010-03-01 18:19:29 -05:00
jeresig
a18f682012
Made some code tweaks related to running jQuery through JSLint (thanks to Lorin Larson for the JSLint run).
2010-03-01 12:44:56 -05:00
jeresig
abcc1a76ee
If .attr() is run on no elements undefined should be returned (as should be the case when no attribute is found). Fixes #6012 .
2010-02-13 02:23:38 -05:00
jeresig
94d925cd46
Make sure leading whitespace is trimmed for parseJSON. Fixes #6031 .
2010-02-13 02:14:23 -05:00
jeresig
7a467ed936
Remove the need for the internal setArray method, it was only really used by pushStack anyway. Fixes #6003 .
2010-02-13 01:45:09 -05:00
jeresig
cb65daa399
The context for 'body' should still be document, in this case.
2010-01-29 15:04:26 -05:00
jeresig
b8076a914b
Landing some minor perf optimization to jQuery().
2010-01-28 17:17:51 -05:00
jeresig
0db207da23
Optimize for the case where a fragment-bound element is being injected into one other element.
2010-01-28 16:30:37 -05:00
jeresig
781fe8b80d
Make empty strings (and other non-string values) simply return null from parseJSON. Also added some parseJSON tests. Fixes #5859 .
2010-01-23 17:08:26 -05:00
jeresig
0912109ffc
Expose the JSON parsing logic. Fixes #5914 .
2010-01-23 16:51:51 -05:00
jeresig
a6ef036bb6
Centralize the logic for throwing exceptions. Fixes #5913 .
2010-01-23 16:48:47 -05:00
Ben Alman
09ef5b7598
Simplification of uaMatch, based upon the patch by Ben Alman.
2010-01-23 12:13:46 -05:00
John Resig
eb496f757a
The inArray declaration was accidentally duplicated.
2010-01-15 10:49:18 -05:00
jeresig
8e53f7b5d6
Fixed typo in logic, also disabled function setters in this case to allow the functions to passthrough and bind.
2010-01-12 21:54:06 -05:00
Paul Irish
7be5ec1248
browser version detection revised for opera >= 10, which was reporting itself as 9.8 due to their new policy
2010-01-12 11:42:31 +08:00
Neeraj Singh
8d7965a607
fixed typo in comments
2010-01-12 11:42:22 +08:00
jeresig
600d314538
A first pass at making sure that all the setter function arguments receive the index of the element and a relevant value to work with. Fixes #5763 .
2010-01-06 15:08:07 -05:00
Filipe Fortes
0d1a2c1b11
Make sure to do a deep copy on arrays. #5750
2010-01-07 00:11:22 +08:00
jeresig
230614b4df
Merging in jQuery.proxy() branch.
2010-01-05 19:18:39 -05:00
jeresig
ffb1867a43
Rewrite of jQuery.browser to become engine-centric, rather than browser-centric. Also attempt to determine the engine version in a smarter fashion, less prone to error. Finally, enhanced the test suite with 255 useragent strings from http://user-agent-string.info/download for testing. jQuery.browser.safari is now deprecated, use jQuery.browser.webkit instead.
2010-01-05 17:01:20 -05:00
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
a5dbca4a06
Moved jQuery.proxy() into core.
2009-12-31 15:06:45 -05:00
jeresig
6cb2945837
Rather than declaring empty anonymous functions all around, introduce and use a single empty function. Thanks to Matt Kruse for the suggestion.
2009-12-31 09:50:49 -05:00
jeresig
3776cbe314
Standardize on using double-quotes for string literals.
2009-12-21 20:13:16 -05:00
jeresig
61e37d4149
Made a number of spacing changes to bring the code more-inline with the jQuery Core Style Guideline.
2009-12-21 19:58:13 -05:00
jeresig
298bfb79e6
The constructor check for isPlainObject was redundant, everything still passes without it.
2009-12-18 19:43:04 -05:00
jeresig
67b3be24e1
Added additional checks for DOM nodes and window to isPlainObject, IE 8 was still letting those pass through. Fixes #5669 .
2009-12-18 19:36: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
jeresig
ed5731dcc4
Revert the changes from 65ebf57c1e
, they were ineffectual against IE's insanity: http://ejohn.org/files/bugs/fragment/ Used a different tactic instead (just don't return a fragment from .parent()). Fixes #5638 .
2009-12-17 14:17:05 -05:00
jeresig
9a0174b057
Moved readyList check.
2009-12-16 23:09:55 -05:00
jeresig
9997620420
Retooled the arguments.callee-related changes in 98ce35d52b
to avoid re-declarations where possible.
2009-12-16 16:45:00 -05: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
ede2f2c4f7
Made some minor formatting changes to the access function.
2009-12-10 09:07:19 -08:00
John Resig
715d1c5a30
Rewrote .merge() (faster and less obtuse now). Fixed #5610 .
2009-12-09 21:43:20 -08:00
Yehuda Katz
1a4d1904ae
Fix up whitespace and a couple of glitches.
2009-12-09 21:17:10 -08:00
John Resig
04524287d3
Switched jQuery() to represent jQuery([]) instead of jQuery(document).
2009-12-09 20:36:07 -08:00
John Resig
9d8bd161b6
Clarified the use of jQuery.browser and enforced jQuery.browser.firefox matching Firefox, after the discussion in 17791c9a3e
.
2009-12-09 15:07:16 -08:00
John Resig
5e2163085c
Make sure that document ready events, inside a document ready, are added to the queue rather than executing immediately. Fixes #5261 .
2009-12-09 13:45:06 -08:00
John Resig
17791c9a3e
Added in jQuery.browser.firefox, deprecated jQuery.browser.mozilla.
2009-12-08 22:52:32 -08:00
Dave Methvin
d3dc2d1234
Get browser version rather than rendering engine version.
...
Don't recognize Chrome as Safari.
See results of different userAgent strings here:
http://spreadsheets.google.com/ccc?key=0Aj5JJFjq9rZDdHdxXzRLVnY0SzFpRTBOUDc4VmhzRVE
2009-12-09 14:43:18 +08:00
John Resig
98ce35d52b
Removed uses of arguments.callee from jQuery.
2009-12-07 16:42:25 -08:00
John Resig
00a0abb751
Moved .ready() to core.js from event.js.
2009-12-07 16:34:55 -08:00
John Resig
62a34450c0
Added an extra function check to prevent crashes in Safari 2. Fixes #3039 .
2009-12-06 20:20:49 -08:00
John Resig
19ad49e607
Use the isXML function from Sizzle.
2009-12-06 17:52:31 -08:00
John Resig
1fe9ff5482
Merge branch 'master' of git@github.com:jquery/jquery
2009-12-06 15:51:15 -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
Dave Methvin
abbd2f4c3c
Fix regexp for $.trim so it doesn't whack embedded spaces.
2009-12-06 10:31:57 +08: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
ad4f28631a
Make sure that a DOM node isn't getting passed through (as is the case in IE, it has a toString of [object Object].
2009-12-02 14:59:19 -05:00
jeresig
df6e02a4a7
Merge branch 'master' of github.com:jquery/jquery
2009-11-30 13:42:26 -05:00
jeresig
90ba57ce6d
Fixed bug with singleTag matching in core.js.
2009-11-30 13:42:19 -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
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
lrbabe
c07d15d5a2
Use array.indexOf if available (speeds up modern browsers). Thanks to lrbabe and Andrea for the patch. Fixes #5160 .
2009-11-11 15:15:58 -05: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
John Resig
dee8e45ef3
Removed the use of this.length++ as it makes it hard to use the init method directly. Fixes #4955 .
2009-11-11 13:42:50 -05:00
John Resig
4b55e94d08
Renamed isObject to isObjectLiteral to be more specific.
2009-11-10 23:07:05 -05:00
rkatic
c2bbcd8833
Added comments to isObject.
2009-11-09 19:32:24 +08:00
John Resig
ef05f44cce
Comment nodes are discarded from a merge, for no apparent reason. Fixes #5438 .
2009-11-07 16:15:33 +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
Ariel Flesler
66c58e9db6
jquery core: removing the body optimization, as it is then handled by $("TAG").
2009-09-14 17:33:15 +00:00
Ariel Flesler
9e1a955aab
jquery core: commenting the new access function.
2009-09-11 17:47:40 +00:00