Skip to content

Commit 57fe6ed

Browse files
jdomnitzscottgonzalez
authored andcommitted
JavaScript "strict mode" fixes
1 parent adaba77 commit 57fe6ed

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

ui/jquery.ui.position.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ $.ui.position = {
414414

415415
// fraction support test
416416
(function () {
417-
var testElement, testElementParent, testElementStyle, offsetLeft, i
417+
var testElement, testElementParent, testElementStyle, offsetLeft, i,
418418
body = document.getElementsByTagName( "body" )[ 0 ],
419419
div = document.createElement( "div" );
420420

ui/jquery.ui.tabs.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -947,9 +947,7 @@ if ( $.uiBackCompat !== false ) {
947947

948948
// cookie option
949949
var listId = 0;
950-
function getNextListId() {
951-
return ++listId;
952-
}
950+
953951
$.widget( "ui.tabs", $.ui.tabs, {
954952
options: {
955953
cookie: null // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true }
@@ -968,7 +966,7 @@ if ( $.uiBackCompat !== false ) {
968966
},
969967
_cookie: function( active ) {
970968
var cookie = [ this.cookie ||
971-
( this.cookie = this.options.cookie.name || "ui-tabs-" + getNextListId() ) ];
969+
( this.cookie = this.options.cookie.name || "ui-tabs-" + ++listId ) ];
972970
if ( arguments.length ) {
973971
cookie.push( active === false ? -1 : active );
974972
cookie.push( this.options.cookie );

ui/jquery.ui.widget.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ $.widget.bridge = function( name, object ) {
182182
if ( instance ) {
183183
instance.option( options || {} )._init();
184184
} else {
185-
object( options, this );
185+
new object( options, this );
186186
}
187187
});
188188
}

0 commit comments

Comments
 (0)