});
function getElementStyles() {
- var style = this.ownerDocument.defaultView
- ? this.ownerDocument.defaultView.getComputedStyle( this, null )
- : this.currentStyle,
+ var style = this.ownerDocument.defaultView ?
+ this.ownerDocument.defaultView.getComputedStyle( this, null ) :
+ this.currentStyle,
newStyle = {},
key,
camelCase,
case "middle": y = 0.5; break;
case "bottom": y = 1; break;
default: y = origin[ 0 ] / original.height;
- };
+ }
switch ( origin[ 1 ] ) {
case "left": x = 0; break;
case "center": x = 0.5; break;
case "right": x = 1; break;
default: x = origin[ 1 ] / original.width;
- };
+ }
return {
x: x,
y: y
}
speed = speed || options.duration;
- effect.duration = $.fx.off ? 0 : typeof speed === "number"
- ? speed : speed in $.fx.speeds ? $.fx.speeds[ speed ] : $.fx.speeds._default;
+ effect.duration = $.fx.off ? 0 :
+ typeof speed === "number" ? speed :
+ speed in $.fx.speeds ? $.fx.speeds[ speed ] :
+ $.fx.speeds._default;
effect.complete = callback || options.complete;
return 1 - easeIn( 1 - p );
};
$.easing[ "easeInOut" + name ] = function( p ) {
- return p < .5 ?
+ return p < 0.5 ?
easeIn( p * 2 ) / 2 :
easeIn( p * -2 + 2 ) / -2 + 1;
};
el.show();
$.effects.createWrapper( el );
- distance = o.distance || el[ ref == "top" ? "outerHeight": "outerWidth" ]({ margin: true }) / 2;
+ distance = o.distance || el[ ref === "top" ? "outerHeight": "outerWidth" ]({ margin: true }) / 2;
if ( show ) {
el
.css( "opacity", 0 )
- .css( ref, motion == "pos" ? -distance : distance );
+ .css( ref, motion === "pos" ? -distance : distance );
}
// Animation
animation[ ref ] = ( show ?
( motion === "pos" ? "+=" : "-=" ) :
- ( motion === "pos" ? "-=" : "+=" ) )
- + distance;
+ ( motion === "pos" ? "-=" : "+=" ) ) +
+ distance;
// Animate
el.animate( animation, {
duration: o.duration,
easing: o.easing,
complete: function() {
- mode == "hide" && el.hide();
+ if ( mode === "hide" ) {
+ el.hide();
+ }
$.effects.restore( el, props );
$.effects.removeWrapper( el );
done();
}
});
-
};
})(jQuery);
mode: mode,
complete: done,
percent: hide ? percent : 100,
- from: hide
- ? original
- : {
+ from: hide ?
+ original :
+ {
height: original.height * factor,
width: original.width * factor
}
var el = $( this ),
options = $.extend( true, {}, o ),
mode = $.effects.setMode( el, o.mode || "effect" ),
- percent = parseInt( o.percent, 10 ) || ( parseInt( o.percent, 10 ) == 0 ? 0 : ( mode == "hide" ? 0 : 100 ) ),
+ percent = parseInt( o.percent, 10 ) || ( parseInt( o.percent, 10 ) === 0 ? 0 : ( mode == "hide" ? 0 : 100 ) ),
direction = o.direction || "both",
origin = o.origin,
original = {
outerWidth: original.outerWidth * factor.x
};
- if ( options.fade ) { // Fade option to support puff
+ // Fade option to support puff
+ if ( options.fade ) {
if ( mode == "show" ) {
options.from.opacity = 0;
options.to.opacity = 1;
options.from.opacity = 1;
options.to.opacity = 0;
}
- };
+ }
// Animate
el.effect( options );
props = props.concat( vProps );
el.from = $.effects.setTransition( el, vProps, factor.from.y, el.from );
el.to = $.effects.setTransition( el, vProps, factor.to.y, el.to );
- };
+ }
// Horizontal props scaling
if ( factor.from.x !== factor.to.x ) {
props = props.concat( hProps );
el.from = $.effects.setTransition( el, hProps, factor.from.x, el.from );
el.to = $.effects.setTransition( el, hProps, factor.to.x, el.to );
- };
- };
+ }
+ }
// Scale the content
if ( scale == "content" || scale == "both" ) {
props = props.concat( cProps );
el.from = $.effects.setTransition( el, cProps, factor.from.y, el.from );
el.to = $.effects.setTransition( el, cProps, factor.to.y, el.to );
- };
- };
-
+ }
+ }
+
$.effects.save( el, restore ? props : props1 );
el.show();
$.effects.createWrapper( el );
if ( factor.from.y != factor.to.y ) {
child.from = $.effects.setTransition( child, vProps, factor.from.y, child.from );
child.to = $.effects.setTransition( child, vProps, factor.to.y, child.to );
- };
+ }
// Horizontal props scaling
if ( factor.from.x != factor.to.x ) {
child.from = $.effects.setTransition( child, hProps, factor.from.x, child.from );
child.to = $.effects.setTransition( child, hProps, factor.to.x, child.to );
- };
+ }
// Animate children
child.css( child.from );
if (restore) $.effects.restore( child, props2 );
});
});
- };
+ }
// Animate
el.animate( el.to, {
// Shakes
for ( i = 1; i < times; i++ ) {
el.animate( animation1, speed, o.easing ).animate( animation2, speed, o.easing );
- };
+ }
el
.animate( animation1, speed, o.easing )
.animate( animation, speed / 2, o.easing )
// Animation
animation[ ref ] = ( show ?
( positiveMotion ? "+=" : "-=") :
- ( positiveMotion ? "-=" : "+="))
- + distance;
+ ( positiveMotion ? "-=" : "+=")) +
+ distance;
// Animate
el.animate( animation, {
done();
}
});
-
};
})(jQuery);
easing: "easeOutBounce",
duration: 1000
}
- }
+ };
} else {
options.animate = options.animated;
}
suppressKeyPress = true;
event.preventDefault();
}
- //passthrough - ENTER and TAB both select the current element
+ // passthrough - ENTER and TAB both select the current element
case keyCode.TAB:
if ( !self.menu.active ) {
return;
.data( "menu" );
if ( $.fn.bgiframe ) {
- this.menu.element.bgiframe();
+ this.menu.element.bgiframe();
}
// turning off autocomplete prevents the browser from remembering the
img = $( "img[usemap=#" + mapName + "]" )[0];
return !!img && visible( img );
}
- return ( /input|select|textarea|button|object/.test( nodeName )
- ? !element.disabled
- : "a" == nodeName
- ? element.href || isTabIndexNotNaN
- : isTabIndexNotNaN)
+ return ( /input|select|textarea|button|object/.test( nodeName ) ?
+ !element.disabled :
+ "a" == nodeName ?
+ element.href || isTabIndexNotNaN :
+ isTabIndexNotNaN) &&
// the element and all of its ancestors must be visible
- && visible( element );
+ visible( element );
}
function visible( element ) {
var position = $.extend({}, {
of: this.active
- }, $.type(this.options.position) == "function"
- ? this.options.position(this.active)
- : this.options.position
+ }, $.type(this.options.position) == "function" ?
+ this.options.position(this.active) :
+ this.options.position
);
submenu.show()
_mouseDown: function(event) {
// don't let more than one widget handle mouseStart
- if( mouseHandled ) { return };
+ if( mouseHandled ) { return; }
// we may have missed mouseup (out of window)
(this._mouseStarted && this._mouseUp(event));
var elem = $( this ),
elemWidth = elem.outerWidth(),
elemHeight = elem.outerHeight(),
- marginLeft = parseInt( $.css( this, "marginLeft" ) ) || 0,
- marginTop = parseInt( $.css( this, "marginTop" ) ) || 0,
+ marginLeft = parseInt( $.css( this, "marginLeft" ), 10 ) || 0,
+ marginTop = parseInt( $.css( this, "marginTop" ), 10 ) || 0,
scrollInfo = $.position.getScrollInfo( within ),
collisionWidth = elemWidth + marginLeft +
- ( parseInt( $.css( this, "marginRight" ) ) || 0 ) + scrollInfo.width,
+ ( parseInt( $.css( this, "marginRight" ), 10 ) || 0 ) + scrollInfo.width,
collisionHeight = elemHeight + marginTop +
- ( parseInt( $.css( this, "marginBottom" ) ) || 0 ) + scrollInfo.height,
+ ( parseInt( $.css( this, "marginBottom" ), 10 ) || 0 ) + scrollInfo.height,
position = $.extend( {}, basePosition ),
myOffset = [
parseInt( offsets.my[ 0 ], 10 ) *
at: at[ 0 ] + offset[ 0 ] + " " + at[ 1 ] + offset[ 1 ],
offset: undefined
} ) );
- }
+ };
}( jQuery ) );
}
},
_cookie: function( active ) {
var cookie = [ this.cookie ||
- ( this.cookie = this.options.cookie.name || "ui-tabs-" + ++listId ) ];
+ ( this.cookie = this.options.cookie.name || "ui-tabs-" + (++listId) ) ];
if ( arguments.length ) {
cookie.push( active === false ? -1 : active );
cookie.push( this.options.cookie );