- rfxnum = /^([+-]=)?([\d+-.]+)(.*)$/,
+ rfxnum = /^([+\-]=)?([\d+.\-]+)(.*)$/,
+ rdashAlpha = /-([a-z])/ig,
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
// opacity animations
[ "opacity" ]
[ "width", "marginLeft", "marginRight", "paddingLeft", "paddingRight" ],
// opacity animations
[ "opacity" ]
return this.animate( genFx("show", 3), speed, callback);
} else {
return this.animate( genFx("show", 3), speed, callback);
} else {
var old = jQuery.data(this[i], "olddisplay");
this[i].style.display = old || "";
var old = jQuery.data(this[i], "olddisplay");
this[i].style.display = old || "";
var nodeName = this[i].nodeName, display;
if ( elemdisplay[ nodeName ] ) {
var nodeName = this[i].nodeName, display;
if ( elemdisplay[ nodeName ] ) {
return this.animate( genFx("hide", 3), speed, callback);
} else {
return this.animate( genFx("hide", 3), speed, callback);
} else {
- if ( !old && old !== "none" ){
- jQuery.data(this[i], "olddisplay", jQuery.css(this[i], "display"));
+ if ( !old && old !== "none" ) {
+ jQuery.data( this[i], "olddisplay", jQuery.css( this[i], "display" ) );
this._toggle.apply( this, arguments );
} else if ( fn == null || bool ) {
this._toggle.apply( this, arguments );
} else if ( fn == null || bool ) {
animate: function( prop, speed, easing, callback ) {
var optall = jQuery.speed(speed, easing, callback);
animate: function( prop, speed, easing, callback ) {
var optall = jQuery.speed(speed, easing, callback);
return this[ optall.queue === false ? "each" : "queue" ](function() {
var opt = jQuery.extend({}, optall), p,
hidden = this.nodeType === 1 && jQuery(this).is(":hidden"),
return this[ optall.queue === false ? "each" : "queue" ](function() {
var opt = jQuery.extend({}, optall), p,
hidden = this.nodeType === 1 && jQuery(this).is(":hidden"),
// go in reverse order so anything added to the queue during the loop is ignored
for ( var i = timers.length - 1; i >= 0; i-- ) {
if ( timers[i].elem === this ) {
// go in reverse order so anything added to the queue during the loop is ignored
for ( var i = timers.length - 1; i >= 0; i-- ) {
if ( timers[i].elem === this ) {
// Generate shortcuts for custom animations
jQuery.each({
slideDown: genFx("show", 1),
// Generate shortcuts for custom animations
jQuery.each({
slideDown: genFx("show", 1),
slideToggle: genFx("toggle", 1),
fadeIn: { opacity: "show" },
fadeOut: { opacity: "hide" }
slideToggle: genFx("toggle", 1),
fadeIn: { opacity: "show" },
fadeOut: { opacity: "hide" }
-}, function( name, props ){
- jQuery.fn[ name ] = function( speed, callback ){
+}, function( name, props ) {
+ jQuery.fn[ name ] = function( speed, callback ) {
if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
return this.elem[ this.prop ];
}
if ( this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null) ) {
return this.elem[ this.prop ];
}
- var r = parseFloat(jQuery.css(this.elem, this.prop, force));
- return r && r > -10000 ? r : parseFloat(jQuery.curCSS(this.elem, this.prop)) || 0;
+ var r = jQuery.css( this.elem, this.prop );
+ return r && r > -10000 ? r : 0;
},
// Start an animation from one number to another
custom: function( from, to, unit ) {
},
// Start an animation from one number to another
custom: function( from, to, unit ) {
var old = jQuery.data(this.elem, "olddisplay");
this.elem.style.display = old ? old : this.options.display;
var old = jQuery.data(this.elem, "olddisplay");
this.elem.style.display = old ? old : this.options.display;
// Reset the properties, if the item has been hidden or shown
if ( this.options.hide || this.options.show ) {
for ( var p in this.options.curAnim ) {
// Reset the properties, if the item has been hidden or shown
if ( this.options.hide || this.options.show ) {
for ( var p in this.options.curAnim ) {
- jQuery.expr.filters.animated = function(elem){
- return jQuery.grep(jQuery.timers, function(fn){
+ jQuery.expr.filters.animated = function( elem ) {
+ return jQuery.grep(jQuery.timers, function( fn ) {