@@ -20,8 +20,8 @@ $.effects = {
20
20
/******************************************************************************/
21
21
22
22
// override the animation for color styles
23
- $ . each ( [ ' backgroundColor' , ' borderBottomColor' , ' borderLeftColor' ,
24
- ' borderRightColor' , ' borderTopColor' , ' borderColor' , ' color' , ' outlineColor' ] ,
23
+ $ . each ( [ " backgroundColor" , " borderBottomColor" , " borderLeftColor" ,
24
+ " borderRightColor" , " borderTopColor" , " borderColor" , " color" , " outlineColor" ] ,
25
25
function ( i , attr ) {
26
26
$ . fx . step [ attr ] = function ( fx ) {
27
27
if ( ! fx . colorInit ) {
@@ -30,10 +30,10 @@ function(i, attr) {
30
30
fx . colorInit = true ;
31
31
}
32
32
33
- fx . elem . style [ attr ] = ' rgb(' +
34
- Math . max ( Math . min ( parseInt ( ( fx . pos * ( fx . end [ 0 ] - fx . start [ 0 ] ) ) + fx . start [ 0 ] , 10 ) , 255 ) , 0 ) + ',' +
35
- Math . max ( Math . min ( parseInt ( ( fx . pos * ( fx . end [ 1 ] - fx . start [ 1 ] ) ) + fx . start [ 1 ] , 10 ) , 255 ) , 0 ) + ',' +
36
- Math . max ( Math . min ( parseInt ( ( fx . pos * ( fx . end [ 2 ] - fx . start [ 2 ] ) ) + fx . start [ 2 ] , 10 ) , 255 ) , 0 ) + ')' ;
33
+ fx . elem . style [ attr ] = " rgb(" +
34
+ Math . max ( Math . min ( parseInt ( ( fx . pos * ( fx . end [ 0 ] - fx . start [ 0 ] ) ) + fx . start [ 0 ] , 10 ) , 255 ) , 0 ) + "," +
35
+ Math . max ( Math . min ( parseInt ( ( fx . pos * ( fx . end [ 1 ] - fx . start [ 1 ] ) ) + fx . start [ 1 ] , 10 ) , 255 ) , 0 ) + "," +
36
+ Math . max ( Math . min ( parseInt ( ( fx . pos * ( fx . end [ 2 ] - fx . start [ 2 ] ) ) + fx . start [ 2 ] , 10 ) , 255 ) , 0 ) + ")" ;
37
37
} ;
38
38
} ) ;
39
39
@@ -46,7 +46,7 @@ function getRGB(color) {
46
46
var result ;
47
47
48
48
// Check if we're already dealing with an array of colors
49
- if ( color && color . constructor == Array && color . length == 3 )
49
+ if ( color && color . constructor === Array && color . length = == 3 )
50
50
return color ;
51
51
52
52
// Look for rgb(num,num,num)
@@ -67,7 +67,7 @@ function getRGB(color) {
67
67
68
68
// Look for rgba(0, 0, 0, 0) == transparent in Safari 3
69
69
if ( result = / r g b a \( 0 , 0 , 0 , 0 \) / . exec ( color ) )
70
- return colors [ ' transparent' ] ;
70
+ return colors [ " transparent" ] ;
71
71
72
72
// Otherwise, we're most likely dealing with a named color
73
73
return colors [ $ . trim ( color ) . toLowerCase ( ) ] ;
@@ -80,7 +80,7 @@ function getColor(elem, attr) {
80
80
color = $ . curCSS ( elem , attr ) ;
81
81
82
82
// Keep going until we find an element that has color, or we hit the body
83
- if ( color != '' && color != ' transparent' || $ . nodeName ( elem , "body" ) )
83
+ if ( color != "" && color !== " transparent" || $ . nodeName ( elem , "body" ) )
84
84
break ;
85
85
86
86
attr = "backgroundColor" ;
@@ -160,15 +160,15 @@ var classAnimationActions = [ "add", "remove", "toggle" ],
160
160
} ,
161
161
// prefix used for storing data on .data()
162
162
dataSpace = "ec.storage." ;
163
-
163
+
164
164
$ . each ( [ "borderLeftStyle" , "borderRightStyle" , "borderBottomStyle" , "borderTopStyle" ] , function ( _ , prop ) {
165
165
$ . fx . step [ prop ] = function ( fx ) {
166
166
if ( fx . end !== "none" && ! fx . setAttr || fx . pos === 1 && ! fx . setAttr ) {
167
167
jQuery . style ( fx . elem , prop , fx . end ) ;
168
168
fx . setAttr = true ;
169
169
}
170
170
} ;
171
- } )
171
+ } ) ;
172
172
173
173
function getElementStyles ( ) {
174
174
var style = document . defaultView
@@ -225,7 +225,7 @@ $.effects.animateClass = function( value, duration, easing, callback ) {
225
225
var animated = $ ( this ) ,
226
226
baseClass = animated . attr ( "class" ) ,
227
227
finalClass ,
228
- originalStyleAttr = animated . attr ( "style" ) || ' ' ,
228
+ originalStyleAttr = animated . attr ( "style" ) || " " ,
229
229
originalStyle = getElementStyles . call ( this ) ,
230
230
newStyle ,
231
231
diff ,
@@ -249,11 +249,11 @@ $.effects.animateClass = function( value, duration, easing, callback ) {
249
249
complete : function ( ) {
250
250
animated . attr ( "class" , finalClass ) ;
251
251
252
- if ( typeof animated . attr ( ' style' ) == ' object' ) {
253
- animated . attr ( ' style' ) . cssText = '' ;
254
- animated . attr ( ' style' ) . cssText = originalStyleAttr ;
252
+ if ( typeof animated . attr ( " style" ) === " object" ) {
253
+ animated . attr ( " style" ) . cssText = "" ;
254
+ animated . attr ( " style" ) . cssText = originalStyleAttr ;
255
255
} else {
256
- animated . attr ( ' style' , originalStyleAttr ) ;
256
+ animated . attr ( " style" , originalStyleAttr ) ;
257
257
}
258
258
259
259
// this is guarnteed to be there if you use jQuery.speed()
@@ -267,21 +267,21 @@ $.effects.animateClass = function( value, duration, easing, callback ) {
267
267
$ . fn . extend ( {
268
268
_addClass : $ . fn . addClass ,
269
269
addClass : function ( classNames , speed , easing , callback ) {
270
- return speed ?
270
+ return speed ?
271
271
$ . effects . animateClass . apply ( this , [ { add : classNames } , speed , easing , callback ] ) :
272
272
this . _addClass ( classNames ) ;
273
273
} ,
274
274
275
275
_removeClass : $ . fn . removeClass ,
276
276
removeClass : function ( classNames , speed , easing , callback ) {
277
- return speed ?
277
+ return speed ?
278
278
$ . effects . animateClass . apply ( this , [ { remove : classNames } , speed , easing , callback ] ) :
279
279
this . _removeClass ( classNames ) ;
280
280
} ,
281
281
282
282
_toggleClass : $ . fn . toggleClass ,
283
283
toggleClass : function ( classNames , force , speed , easing , callback ) {
284
- if ( typeof force == "boolean" || force === undefined ) {
284
+ if ( typeof force === "boolean" || force === undefined ) {
285
285
if ( ! speed ) {
286
286
// without speed parameter;
287
287
return this . _toggleClass ( classNames , force ) ;
@@ -295,9 +295,9 @@ $.fn.extend({
295
295
} ,
296
296
297
297
switchClass : function ( remove , add , speed , easing , callback ) {
298
- return $ . effects . animateClass . apply ( this , [ {
299
- add : add ,
300
- remove : remove
298
+ return $ . effects . animateClass . apply ( this , [ {
299
+ add : add ,
300
+ remove : remove
301
301
} , speed , easing , callback ] ) ;
302
302
}
303
303
} ) ;
@@ -330,26 +330,26 @@ $.extend( $.effects, {
330
330
} ,
331
331
332
332
setMode : function ( el , mode ) {
333
- if ( mode == ' toggle' ) {
334
- mode = el . is ( ' :hidden' ) ? ' show' : ' hide' ;
333
+ if ( mode === " toggle" ) {
334
+ mode = el . is ( " :hidden" ) ? " show" : " hide" ;
335
335
}
336
336
return mode ;
337
337
} ,
338
338
339
339
// Translates a [top,left] array into a baseline value
340
340
// this should be a little more flexible in the future to handle a string & hash
341
- getBaseline : function ( origin , original ) {
341
+ getBaseline : function ( origin , original ) {
342
342
var y , x ;
343
343
switch ( origin [ 0 ] ) {
344
- case ' top' : y = 0 ; break ;
345
- case ' middle' : y = 0.5 ; break ;
346
- case ' bottom' : y = 1 ; break ;
344
+ case " top" : y = 0 ; break ;
345
+ case " middle" : y = 0.5 ; break ;
346
+ case " bottom" : y = 1 ; break ;
347
347
default : y = origin [ 0 ] / original . height ;
348
348
} ;
349
349
switch ( origin [ 1 ] ) {
350
- case ' left' : x = 0 ; break ;
351
- case ' center' : x = 0.5 ; break ;
352
- case ' right' : x = 1 ; break ;
350
+ case " left" : x = 0 ; break ;
351
+ case " center" : x = 0.5 ; break ;
352
+ case " right" : x = 1 ; break ;
353
353
default : x = origin [ 1 ] / original . width ;
354
354
} ;
355
355
return {
@@ -362,22 +362,22 @@ $.extend( $.effects, {
362
362
createWrapper : function ( element ) {
363
363
364
364
// if the element is already wrapped, return it
365
- if ( element . parent ( ) . is ( ' .ui-effects-wrapper' ) ) {
365
+ if ( element . parent ( ) . is ( " .ui-effects-wrapper" ) ) {
366
366
return element . parent ( ) ;
367
367
}
368
368
369
369
// wrap the element
370
370
var props = {
371
371
width : element . outerWidth ( true ) ,
372
372
height : element . outerHeight ( true ) ,
373
- ' float' : element . css ( ' float' )
373
+ " float" : element . css ( " float" )
374
374
} ,
375
- wrapper = $ ( ' <div></div>' )
376
- . addClass ( ' ui-effects-wrapper' )
375
+ wrapper = $ ( " <div></div>" )
376
+ . addClass ( " ui-effects-wrapper" )
377
377
. css ( {
378
- fontSize : ' 100%' ,
379
- background : ' transparent' ,
380
- border : ' none' ,
378
+ fontSize : " 100%" ,
379
+ background : " transparent" ,
380
+ border : " none" ,
381
381
margin : 0 ,
382
382
padding : 0
383
383
} ) ;
@@ -386,34 +386,34 @@ $.extend( $.effects, {
386
386
wrapper = element . parent ( ) ; //Hotfix for jQuery 1.4 since some change in wrap() seems to actually loose the reference to the wrapped element
387
387
388
388
// transfer positioning properties to the wrapper
389
- if ( element . css ( ' position' ) == ' static' ) {
390
- wrapper . css ( { position : ' relative' } ) ;
391
- element . css ( { position : ' relative' } ) ;
389
+ if ( element . css ( " position" ) === " static" ) {
390
+ wrapper . css ( { position : " relative" } ) ;
391
+ element . css ( { position : " relative" } ) ;
392
392
} else {
393
393
$ . extend ( props , {
394
- position : element . css ( ' position' ) ,
395
- zIndex : element . css ( ' z-index' )
394
+ position : element . css ( " position" ) ,
395
+ zIndex : element . css ( " z-index" )
396
396
} ) ;
397
- $ . each ( [ ' top' , ' left' , ' bottom' , ' right' ] , function ( i , pos ) {
397
+ $ . each ( [ " top" , " left" , " bottom" , " right" ] , function ( i , pos ) {
398
398
props [ pos ] = element . css ( pos ) ;
399
399
if ( isNaN ( parseInt ( props [ pos ] , 10 ) ) ) {
400
- props [ pos ] = ' auto' ;
400
+ props [ pos ] = " auto" ;
401
401
}
402
402
} ) ;
403
403
element . css ( {
404
- position : ' relative' ,
404
+ position : " relative" ,
405
405
top : 0 ,
406
406
left : 0 ,
407
- right : ' auto' ,
408
- bottom : ' auto'
407
+ right : " auto" ,
408
+ bottom : " auto"
409
409
} ) ;
410
410
}
411
411
412
412
return wrapper . css ( props ) . show ( ) ;
413
413
} ,
414
414
415
415
removeWrapper : function ( element ) {
416
- if ( element . parent ( ) . is ( ' .ui-effects-wrapper' ) )
416
+ if ( element . parent ( ) . is ( " .ui-effects-wrapper" ) )
417
417
return element . parent ( ) . replaceWith ( element ) ;
418
418
return element ;
419
419
} ,
@@ -452,7 +452,7 @@ function _normalizeArguments( effect, options, speed, callback ) {
452
452
}
453
453
454
454
// catch (effect, speed, ?)
455
- if ( $ . type ( options ) == ' number' || $ . fx . speeds [ options ] ) {
455
+ if ( $ . type ( options ) === " number" || $ . fx . speeds [ options ] ) {
456
456
callback = speed ;
457
457
speed = options ;
458
458
options = { } ;
@@ -468,9 +468,9 @@ function _normalizeArguments( effect, options, speed, callback ) {
468
468
if ( options ) {
469
469
$ . extend ( effect , options ) ;
470
470
}
471
-
471
+
472
472
speed = speed || options . duration ;
473
- effect . duration = $ . fx . off ? 0 : typeof speed == ' number'
473
+ effect . duration = $ . fx . off ? 0 : typeof speed === " number"
474
474
? speed : speed in $ . fx . speeds ? $ . fx . speeds [ speed ] : $ . fx . speeds . _default ;
475
475
476
476
effect . complete = callback || options . complete ;
@@ -483,7 +483,7 @@ function standardSpeed( speed ) {
483
483
if ( ! speed || typeof speed === "number" || $ . fx . speeds [ speed ] ) {
484
484
return true ;
485
485
}
486
-
486
+
487
487
// invalid strings - treat as "normal" speed
488
488
if ( typeof speed === "string" && ! $ . effects . effect [ speed ] ) {
489
489
// TODO: remove in 2.0 (#7115)
@@ -492,7 +492,7 @@ function standardSpeed( speed ) {
492
492
}
493
493
return true ;
494
494
}
495
-
495
+
496
496
return false ;
497
497
}
498
498
@@ -538,7 +538,7 @@ $.fn.extend({
538
538
return this . _show . apply ( this , arguments ) ;
539
539
} else {
540
540
var args = _normalizeArguments . apply ( this , arguments ) ;
541
- args . mode = ' show' ;
541
+ args . mode = " show" ;
542
542
return this . effect . call ( this , args ) ;
543
543
}
544
544
} ,
@@ -549,7 +549,7 @@ $.fn.extend({
549
549
return this . _hide . apply ( this , arguments ) ;
550
550
} else {
551
551
var args = _normalizeArguments . apply ( this , arguments ) ;
552
- args . mode = ' hide' ;
552
+ args . mode = " hide" ;
553
553
return this . effect . call ( this , args ) ;
554
554
}
555
555
} ,
@@ -561,7 +561,7 @@ $.fn.extend({
561
561
return this . __toggle . apply ( this , arguments ) ;
562
562
} else {
563
563
var args = _normalizeArguments . apply ( this , arguments ) ;
564
- args . mode = ' toggle' ;
564
+ args . mode = " toggle" ;
565
565
return this . effect . call ( this , args ) ;
566
566
}
567
567
} ,
@@ -571,7 +571,7 @@ $.fn.extend({
571
571
var style = this . css ( key ) ,
572
572
val = [ ] ;
573
573
574
- $ . each ( [ 'em' , 'px' , '%' , 'pt' ] , function ( i , unit ) {
574
+ $ . each ( [ "em" , "px" , "%" , "pt" ] , function ( i , unit ) {
575
575
if ( style . indexOf ( unit ) > 0 )
576
576
val = [ parseFloat ( style ) , unit ] ;
577
577
} ) ;
@@ -626,7 +626,7 @@ $.fn.extend({
626
626
$ . easing . jswing = $ . easing . swing ;
627
627
628
628
$ . extend ( $ . easing , {
629
- def : ' easeOutQuad' ,
629
+ def : " easeOutQuad" ,
630
630
swing : function ( x , t , b , c , d ) {
631
631
return $ . easing [ $ . easing . def ] ( x , t , b , c , d ) ;
632
632
} ,
@@ -707,9 +707,9 @@ $.extend( $.easing, {
707
707
a = c ;
708
708
if ( t == 0 ) return b ;
709
709
if ( ( t /= d ) == 1 ) return b + c ;
710
- if ( a < Math . abs ( c ) ) {
711
- a = c ;
712
- s = p / 4 ;
710
+ if ( a < Math . abs ( c ) ) {
711
+ a = c ;
712
+ s = p / 4 ;
713
713
} else {
714
714
s = p / ( 2 * Math . PI ) * Math . asin ( c / a ) ;
715
715
}
@@ -722,8 +722,8 @@ $.extend( $.easing, {
722
722
if ( t == 0 ) return b ;
723
723
if ( ( t /= d ) == 1 ) return b + c ;
724
724
if ( a < Math . abs ( c ) ) {
725
- a = c ;
726
- s = p / 4 ;
725
+ a = c ;
726
+ s = p / 4 ;
727
727
} else {
728
728
s = p / ( 2 * Math . PI ) * Math . asin ( c / a ) ;
729
729
}
@@ -735,7 +735,7 @@ $.extend( $.easing, {
735
735
a = c ;
736
736
if ( t == 0 ) return b ;
737
737
if ( ( t /= d / 2 ) == 2 ) return b + c ;
738
- if ( a < Math . abs ( c ) ) {
738
+ if ( a < Math . abs ( c ) ) {
739
739
a = c ;
740
740
s = p / 4 ;
741
741
} else {
0 commit comments