Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switched jQuery() to represent jQuery([]) instead of jQuery(document).
- Loading branch information
Showing
2 changed files
with
2 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0452428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a great idea, but it's going to screw over a LOT of people who followed bad jQuery tutorials online that all seem to love recommending$() as a shortcut to $ (document).
0452428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yowzer! This is going to break a lot of code: http://www.google.com/codesearch?hl=en&lr=&q=\$\(\)\.ready&sbtn=Search
I agree with ajpiano though; definitely a good idea!
0452428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops. That link's broken. This works - http://bit.ly/69rX6h
0452428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh, nevermind, seems that
jQuery.fn.ready
binds the ready function regardless of the collection.0452428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since .ready() still works it doesn't seem too bad. Using a modified search of $(). on Google Code I found these that may need changing:
jqDnR
BlockUI
jrails
svg-editor
jsSpeedTester
It would be great to see this change happen but maybe it needs to go through a deprecation phase?
0452428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ajpiano $(document).ready(function(){
// this is much clearer, more readable!
})
0452428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0452428
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@visionmedia
but of course. no change there.
also this is an old commit. $().ready(function(){ .. will actually work in 1.4, but its deprecated
$().bind/trigger do NOT work in 1.4 however