X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=resources%2Fsrc%2Fjquery%2Fjquery.color.js;h=a3cc8fc3af0d4020865e2a24dc5feaa7acd31584;hb=c24a0a15bed8a448fe21536cac950444ea183d6b;hp=04f8047b8e7f9c752924737813657a04be6cfb17;hpb=bd2a78a159ce6d9f7b27fd75d05570228b44c3cb;p=lhc%2Fweb%2Fwiklou.git diff --git a/resources/src/jquery/jquery.color.js b/resources/src/jquery/jquery.color.js index 04f8047b8e..a3cc8fc3af 100644 --- a/resources/src/jquery/jquery.color.js +++ b/resources/src/jquery/jquery.color.js @@ -28,7 +28,7 @@ } // We override the animation for all of these color styles - $.each([ + $.each( [ 'backgroundColor', 'borderBottomColor', 'borderLeftColor', @@ -37,17 +37,17 @@ 'color', 'outlineColor' ], function ( i, attr ) { - $.fx.step[attr] = function ( fx ) { + $.fx.step[ attr ] = function ( fx ) { if ( !fx.colorInit ) { fx.start = getColor( fx.elem, attr ); fx.end = $.colorUtil.getRGB( fx.end ); fx.colorInit = true; } - fx.elem.style[attr] = 'rgb(' + [ - Math.max( Math.min( parseInt( (fx.pos * (fx.end[0] - fx.start[0])) + fx.start[0], 10 ), 255 ), 0 ), - Math.max( Math.min( parseInt( (fx.pos * (fx.end[1] - fx.start[1])) + fx.start[1], 10 ), 255 ), 0 ), - Math.max( Math.min( parseInt( (fx.pos * (fx.end[2] - fx.start[2])) + fx.start[2], 10 ), 255 ), 0 ) + fx.elem.style[ attr ] = 'rgb(' + [ + Math.max( Math.min( parseInt( ( fx.pos * ( fx.end[ 0 ] - fx.start[ 0 ] ) ) + fx.start[ 0 ], 10 ), 255 ), 0 ), + Math.max( Math.min( parseInt( ( fx.pos * ( fx.end[ 1 ] - fx.start[ 1 ] ) ) + fx.start[ 1 ], 10 ), 255 ), 0 ), + Math.max( Math.min( parseInt( ( fx.pos * ( fx.end[ 2 ] - fx.start[ 2 ] ) ) + fx.start[ 2 ], 10 ), 255 ), 0 ) ].join( ',' ) + ')'; }; } );