mainly made the code shorter:
- removed some needless if's - replace multiple "var x" for one, comma separated declaration. - added a local fn called now() for the (new Date)s - fixed the indentation of a block, and a typo in a comment. - used fn instead of prototype where possible - jquery fx: exposed the speeds hash as jQuery.fx.speeds. Also fixed (again) line endings
This commit is contained in:
parent
ea44348fdb
commit
17b1e407d1
5 changed files with 103 additions and 101 deletions
|
@ -114,12 +114,13 @@ jQuery.extend({
|
|||
|
||||
t = jQuery.trim(t);
|
||||
|
||||
var foundToken = false;
|
||||
var foundToken = false,
|
||||
|
||||
// An attempt at speeding up child selectors that
|
||||
// point to a specific element tag
|
||||
var re = quickChild;
|
||||
var m = re.exec(t);
|
||||
re = quickChild,
|
||||
|
||||
m = re.exec(t);
|
||||
|
||||
if ( m ) {
|
||||
nodeName = m[1].toUpperCase();
|
||||
|
@ -416,8 +417,8 @@ jQuery.extend({
|
|||
},
|
||||
|
||||
dir: function( elem, dir ){
|
||||
var matched = [];
|
||||
var cur = elem[dir];
|
||||
var matched = [],
|
||||
cur = elem[dir];
|
||||
while ( cur && cur != document ) {
|
||||
if ( cur.nodeType == 1 )
|
||||
matched.push( cur );
|
||||
|
@ -449,3 +450,4 @@ jQuery.extend({
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue