aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorjdomnitz <jdomnitz@gmail.com>2012-02-12 19:58:56 -0500
committerScott González <scott.gonzalez@gmail.com>2012-02-12 19:58:56 -0500
commit57fe6ed01d07162fa3c9f7893137c1be509fa625 (patch)
tree5228d07c3d6d984f0764dd58c2cbe6080136f36f /ui
parentadaba7790b676fb6d75dad027c012928d8946cf4 (diff)
downloadjquery-ui-57fe6ed01d07162fa3c9f7893137c1be509fa625.tar.gz
jquery-ui-57fe6ed01d07162fa3c9f7893137c1be509fa625.zip
JavaScript "strict mode" fixes
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.position.js2
-rw-r--r--ui/jquery.ui.tabs.js6
-rw-r--r--ui/jquery.ui.widget.js2
3 files changed, 4 insertions, 6 deletions
diff --git a/ui/jquery.ui.position.js b/ui/jquery.ui.position.js
index 119847cec..b8bb2c883 100644
--- a/ui/jquery.ui.position.js
+++ b/ui/jquery.ui.position.js
@@ -414,7 +414,7 @@ $.ui.position = {
// fraction support test
(function () {
- var testElement, testElementParent, testElementStyle, offsetLeft, i
+ var testElement, testElementParent, testElementStyle, offsetLeft, i,
body = document.getElementsByTagName( "body" )[ 0 ],
div = document.createElement( "div" );
diff --git a/ui/jquery.ui.tabs.js b/ui/jquery.ui.tabs.js
index dc52591b9..6e5cde07e 100644
--- a/ui/jquery.ui.tabs.js
+++ b/ui/jquery.ui.tabs.js
@@ -947,9 +947,7 @@ if ( $.uiBackCompat !== false ) {
// cookie option
var listId = 0;
- function getNextListId() {
- return ++listId;
- }
+
$.widget( "ui.tabs", $.ui.tabs, {
options: {
cookie: null // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
@@ -968,7 +966,7 @@ if ( $.uiBackCompat !== false ) {
},
_cookie: function( active ) {
var cookie = [ this.cookie ||
- ( this.cookie = this.options.cookie.name || "ui-tabs-" + getNextListId() ) ];
+ ( this.cookie = this.options.cookie.name || "ui-tabs-" + ++listId ) ];
if ( arguments.length ) {
cookie.push( active === false ? -1 : active );
cookie.push( this.options.cookie );
diff --git a/ui/jquery.ui.widget.js b/ui/jquery.ui.widget.js
index bf26373e1..2d48ae26d 100644
--- a/ui/jquery.ui.widget.js
+++ b/ui/jquery.ui.widget.js
@@ -182,7 +182,7 @@ $.widget.bridge = function( name, object ) {
if ( instance ) {
instance.option( options || {} )._init();
} else {
- object( options, this );
+ new object( options, this );
}
});
}