X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Feffects.js;h=d3ac99a456f25ae3a7171536a0070f067fa0cc24;hb=d5d4e4df65b56319b4f1216f63008a9751690315;hp=9c8abe5709b437b6ac13b7da8db4cf775e3ef91b;hpb=192bab8ed6e8ad2b4c5de0c4660c80b6ecddfd33;p=jquery.git diff --git a/src/effects.js b/src/effects.js index 9c8abe5..d3ac99a 100644 --- a/src/effects.js +++ b/src/effects.js @@ -3,7 +3,6 @@ var elemdisplay = {}, rfxtypes = /toggle|show|hide/, rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/, - rdashAlpha = /-([a-z])/ig, timerId, fxAttrs = [ // height animations @@ -12,11 +11,7 @@ var elemdisplay = {}, [ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ], // opacity animations [ "opacity" ] - ], - - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; + ]; jQuery.fn.extend({ show: function( speed, callback ) { @@ -125,7 +120,7 @@ jQuery.fn.extend({ self = this; for ( p in prop ) { - var name = p.replace(rdashAlpha, fcamelCase); + var name = jQuery.camelCase( p ); if ( p !== name ) { prop[ name ] = prop[ p ]; @@ -321,7 +316,7 @@ jQuery.fx.prototype = { return this.elem[ this.prop ]; } - var r = parseFloat( jQuery.css( this.elem, this.prop ), 10 ); + var r = parseFloat( jQuery.css( this.elem, this.prop ) ); return r && r > -10000 ? r : 0; },