diff options
author | jeresig <jeresig@gmail.com> | 2010-03-01 21:24:49 -0500 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2010-03-01 21:24:49 -0500 |
commit | dcf0fa5048ef2379d551f29ffa29b14ec5ee09d5 (patch) | |
tree | 8a1575a43c3f62be0aa768590742246fa950f11b /src/effects.js | |
parent | 8c8f685a911c811e9b998958dd453a6a2b9d5940 (diff) | |
download | jquery-dcf0fa5048ef2379d551f29ffa29b14ec5ee09d5.tar.gz jquery-dcf0fa5048ef2379d551f29ffa29b14ec5ee09d5.zip |
More changes to get jQuery in line with JSLint.
Diffstat (limited to 'src/effects.js')
-rw-r--r-- | src/effects.js | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/effects.js b/src/effects.js index c84ff6a8a..97456ccc4 100644 --- a/src/effects.js +++ b/src/effects.js @@ -1,6 +1,6 @@ var elemdisplay = {}, rfxtypes = /toggle|show|hide/, - rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/, + rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/, timerId, fxAttrs = [ // height animations @@ -221,6 +221,16 @@ jQuery.fn.extend({ }); +function genFx( type, num ) { + var obj = {}; + + jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() { + obj[ this ] = type; + }); + + return obj; +} + // Generate shortcuts for custom animations jQuery.each({ slideDown: genFx("show", 1), @@ -470,13 +480,3 @@ if ( jQuery.expr && jQuery.expr.filters ) { }).length; }; } - -function genFx( type, num ) { - var obj = {}; - - jQuery.each( fxAttrs.concat.apply([], fxAttrs.slice(0,num)), function() { - obj[ this ] = type; - }); - - return obj; -} |