X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Feffects.js;h=97456ccc4b4cab163ac00faecef36b43df9f5f85;hb=dcf0fa5048ef2379d551f29ffa29b14ec5ee09d5;hp=c84ff6a8afff0f6efd315fbaeb80392bf5a9bdf1;hpb=8c8f685a911c811e9b998958dd453a6a2b9d5940;p=jquery.git diff --git a/src/effects.js b/src/effects.js index c84ff6a..97456cc 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; -}