From 9626484dd5216f7597d4bb9680c95b9b210bac15 Mon Sep 17 00:00:00 2001 From: Gilmore Davidson Date: Sun, 13 Feb 2011 18:11:40 +1100 Subject: [PATCH] Fixed #6979 - Several components are leaking variables into the global scope --- ui/jquery.effects.pulsate.js | 4 ++-- ui/jquery.effects.scale.js | 2 +- ui/jquery.ui.accordion.js | 2 +- ui/jquery.ui.slider.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ui/jquery.effects.pulsate.js b/ui/jquery.effects.pulsate.js index 8eb999017..1b3cb00f8 100644 --- a/ui/jquery.effects.pulsate.js +++ b/ui/jquery.effects.pulsate.js @@ -15,8 +15,8 @@ $.effects.pulsate = function(o) { return this.queue(function() { var elem = $(this), - mode = $.effects.setMode(elem, o.options.mode || 'show'); - times = ((o.options.times || 5) * 2) - 1; + mode = $.effects.setMode(elem, o.options.mode || 'show'), + times = ((o.options.times || 5) * 2) - 1, duration = o.duration ? o.duration / 2 : $.fx.speeds._default / 2, isVisible = elem.is(':visible'), animateTo = 0; diff --git a/ui/jquery.effects.scale.js b/ui/jquery.effects.scale.js index 281021380..9a4020d58 100644 --- a/ui/jquery.effects.scale.js +++ b/ui/jquery.effects.scale.js @@ -140,7 +140,7 @@ $.effects.size = function(o) { hProps = hProps.concat(['marginLeft','marginRight']); // Add margins props2 = props.concat(vProps).concat(hProps); // Concat el.find("*[width]").each(function(){ - child = $(this); + var child = $(this); if (restore) $.effects.save(child, props2); var c_original = {height: child.height(), width: child.width()}; // Save original child.from = {height: c_original.height * factor.from.y, width: c_original.width * factor.from.x}; diff --git a/ui/jquery.ui.accordion.js b/ui/jquery.ui.accordion.js index 8049868e8..34327be27 100644 --- a/ui/jquery.ui.accordion.js +++ b/ui/jquery.ui.accordion.js @@ -542,7 +542,7 @@ if ( $.uiBackCompat !== false ) { if ( this.options.navigation ) { var self = this, headers = this.element.find( this.options.header ), - content = headers.next(); + content = headers.next(), current = headers.add( content ) .find( "a" ) .filter( this.options.navigationFilter ) diff --git a/ui/jquery.ui.slider.js b/ui/jquery.ui.slider.js index f6bc57025..38c5996d0 100644 --- a/ui/jquery.ui.slider.js +++ b/ui/jquery.ui.slider.js @@ -592,7 +592,7 @@ $.widget( "ui.slider", $.ui.mouse, { return this._valueMax(); } var step = ( this.options.step > 0 ) ? this.options.step : 1, - valModStep = (val - this._valueMin()) % step; + valModStep = (val - this._valueMin()) % step, alignValue = val - valModStep; if ( Math.abs(valModStep) * 2 >= step ) { -- 2.39.5