Commit graph

1360 commits

Author SHA1 Message Date
Rich Dougherty bf71575bb4 Land Rich's fix for not using window.top to do frame detection. Fixes #4787. 2009-11-11 13:56:39 -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 d933e9c26d Opera 9.2 was interpreting .5 as 0.50, changing it to .55 lets the result be the same in all browsers: 0.55. Fixes #5344. 2009-11-11 13:45:03 -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
Mr Speaker 5cb1163469 Making sure that you can bind multiple toggles to a single element without problems. Thanks to 'Mr Speaker' for the original patch. Fixes #5274. 2009-11-11 09:46:24 -05:00
John Resig 4b55e94d08 Renamed isObject to isObjectLiteral to be more specific. 2009-11-10 23:07:05 -05:00
John Resig 262fcf7b7b Require that, at least, document.body exists before firing the ready event. This may stop jQuery from working on pages that don't create a document.body (such as Safari, when no body exists) but considering that we've required a document.body since 1.3 and haven't broken any pages, this doesn't appear to be a pressing issue. Used the test case written by dmethvin to verify the bug and the fix. Fixes #4320. 2009-11-09 13:47:53 +01:00
John Resig 24e18d4cae Backing out commit 81bfd9b870, read the ticket incorrectly - and seeing some of the other earlier tickets it's obvious that a more generic solution is needed. Thanks jdalton for the catch. 2009-11-09 13:30:33 +01:00
John Resig 4fd730dca7 Merge branch 'master' of git@github.com:jquery/jquery 2009-11-09 13:01:10 +01:00
lrbabe d251809912 Making mouseenter and mouseleave work with .live(). 2009-11-09 12:59:54 +01:00
lrbabe 9a69b2cf08 Cleanup bubbling focus and blur events
- Use cached event instead of jQuery.event
- Do not cache event.special if you use it only once
2009-11-09 19:41:43 +08:00
Robert Katić e03aee1aa6 Made the closest method evaluate the selector with appropriate context. 2009-11-09 12:39:29 +01:00
rkatic c2bbcd8833 Added comments to isObject. 2009-11-09 19:32:24 +08:00
John Resig 76f6f0d39d Fixing spacing problems from rkatic's patches. 2009-11-07 17:40:47 +01:00
rkatic 3dc5bc5a8b Make liveHandler to use jQuery.lastCloser and speed up internal sorting. 2009-11-08 00:37:05 +08:00
rkatic 0f03c7489f Store last closer value to jQuery.lastCloser instead of using data API. 2009-11-08 00:36:44 +08:00
John Resig 3106039aa8 Made sure that animate callbacks get executed even when no properties are passed in. Fixes #5459. 2009-11-07 17:22:35 +01: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 ef05f44cce Comment nodes are discarded from a merge, for no apparent reason. Fixes #5438. 2009-11-07 16:15:33 +01:00
John Resig 6a722e251d jQuery.ajax modified the passed-in object only to help test the code - this shouldn't occur. Fixes #5439. 2009-11-07 16:08:07 +01:00
John Resig 81bfd9b870 Make sure that document.body exists, at least, in IE before the ready event is fired. Fixes #5443. 2009-11-07 16:00:43 +01:00
John Resig 513053d62b The complete event wasn't getting called on local file 404s. Thanks to 'mrspeaker' for the patch. Fixes #5468. 2009-11-07 14:59:47 +01:00
John Resig 9a371e2d93 Fixed the case where getComputedStyled was assumed to exist if getBoundingClientRect did (which isn't the case on the Playstation 3). Fixes #5467. 2009-11-07 14:57:27 +01:00
visionmedia 50cf4351a6 Consistant splits using " " instead of ","
This was used in several other areas, and IMO is easier to read
and since nothing is multi-word then we misewell use " "
2009-10-27 08:40:59 +08:00
John Resig 81f65ce339 Pull in the Sizzle library dynamically using a submodule and make it part of the jQuery build process. 2009-10-26 18:23:31 -04: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 bcbd06b66f Removed the revision info and fixed the date pull to work against git log instead of SVN. 2009-10-23 03:25:40 -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 4b5a680f77 Fixed == change in ready. 2009-10-08 18:13:07 +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
Yehuda Katz 67089eedf6 Getting $.param working well; Patch by ben_alman 2009-09-17 22:37:19 +00:00
Yehuda Katz 45dfa3b0fc Probably not the optimal solution, but tests pass. 2009-09-16 08:33:00 +00:00
Ariel Flesler 9ebb2fc654 jquery event: closes #5250. bind(), unbind() and one() support Object Literals (needs some refactor though) 2009-09-16 02:19:18 +00:00
Brandon Aaron 97e134fe80 data should not add expando unless actually adding data 2009-09-15 21:14:08 +00:00
John Resig 24ffc395a7 Missing a var on a for loop, caused a variable to be leaked. 2009-09-15 21:09:46 +00:00
John Resig e907b8769f Missing a var on a for loop, caused a variable to be leaked. 2009-09-15 21:01:00 +00:00
Brandon Aaron daffb954e3 offset is now a setter 2009-09-15 19:15:04 +00:00
Jörn Zaefferer 0b36b26259 fixed global variables introduced in for loop with missing var-keyword (detected via QUnit's no ?noglobals) 2009-09-15 17:39:21 +00:00
Ariel Flesler 5550356a12 jquery attributes: closes #5234. attr() supports jQuery.fn methods. 2009-09-15 17:23:26 +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
Ariel Flesler cf8c1249d1 jquery ajax: addition for #2452. Wasn't working correctly in some cases. 2009-09-15 16:45:37 +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
Ariel Flesler 5b9214e7d8 jquery ajax: closes #2452. get() and post() weren't shifting all arguments correctly. 2009-09-15 15:28:28 +00:00
Ariel Flesler 183f37e4b4 jquery ajax: closes #4994. Adding 'context' setting to $.ajax 2009-09-15 15:19:58 +00:00
Yehuda Katz c4f144eeff avoid creating a new data cache if we don't need one. Also, short-circuit the case where $.data is used to get the cache id 2009-09-15 07:59:53 +00:00
Ariel Flesler 19cd84cf32 jquery data: adding missing semicolons 2009-09-15 01:02:18 +00:00
Yehuda Katz 9b20eb4c85 Make jQuery.winnow a local function 2009-09-15 00:35:35 +00:00
Ariel Flesler 321267dcec jquery fx: closes #2542. show/hide(0, fn) wasn't calling the callback. 2009-09-15 00:32:13 +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