]> source.dussan.org Git - jquery-ui.git/commitdiff
Fixes #6979 - Several components are leaking variables into the global scope.
authorfelix <felix8a@gmail.com>
Thu, 29 Mar 2012 21:59:19 +0000 (14:59 -0700)
committerScott González <scott.gonzalez@gmail.com>
Thu, 29 Mar 2012 22:12:47 +0000 (18:12 -0400)
ui/jquery.effects.core.js
ui/jquery.effects.pulsate.js
ui/jquery.effects.scale.js
ui/jquery.ui.autocomplete.js
ui/jquery.ui.tabs.js

index 27bbe7c31c904845916dc549ffa899b7ab9ae271..b3f99a534e11b88c539bd6e2c9424487d906206f 100644 (file)
@@ -419,7 +419,7 @@ $.extend($.effects, {
        setTransition: function(element, list, factor, value) {
                value = value || {};
                $.each(list, function(i, x){
-                       unit = element.cssUnit(x);
+                       var unit = element.cssUnit(x);
                        if (unit[0] > 0) value[x] = unit[0] * factor + unit[1];
                });
                return value;
index c8a9f4e7c3ea0d75e61f56e2c8dfc78accaea325..8ba93df89e5319acef94da741e93a4bb4c59c4ee 100644 (file)
@@ -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;
index ef4a9654ef0ea45e776d2be1239baf10def82737..aa3e09d020ac590ad46d8ddd7779796df89cd2f3 100644 (file)
@@ -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};
index 60358f8247b0cffbed0223400994e0bc6efe3ef1..c2dc889840752e52533c8aa442de48e2b73461af 100644 (file)
@@ -594,7 +594,7 @@ $.widget("ui.menu", {
                        }
 
                        var base = this.active.offset().top,
-                               height = this.element.height();
+                               height = this.element.height(),
                                result = this.element.children(".ui-menu-item").filter(function() {
                                        var close = $(this).offset().top - base + height - $(this).height();
                                        // TODO improve approximation
index 5bb544889d620a5e40172a3a54e5869132bb9242..3fd6bef7763e8b7ef912260e5505c5b05b78452d 100644 (file)
@@ -733,7 +733,6 @@ $.extend( $.ui.tabs.prototype, {
                                }
                        }
                        : function( e ) {
-                               t = o.selected;
                                rotate();
                        });