JavaScript "strict mode" fixes

This commit is contained in:
jdomnitz 2012-02-12 19:58:56 -05:00 committed by Scott González
parent adaba7790b
commit 57fe6ed01d
3 changed files with 4 additions and 6 deletions

View File

@ -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" );

View File

@ -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 );

View File

@ -182,7 +182,7 @@ $.widget.bridge = function( name, object ) {
if ( instance ) {
instance.option( options || {} )._init();
} else {
object( options, this );
new object( options, this );
}
});
}