Skip to content
Permalink
Browse files

JavaScript "strict mode" fixes

  • Loading branch information
jdomnitz authored and scottgonzalez committed Feb 13, 2012
1 parent adaba77 commit 57fe6ed01d07162fa3c9f7893137c1be509fa625
Showing with 4 additions and 6 deletions.
  1. +1 −1 ui/jquery.ui.position.js
  2. +2 −4 ui/jquery.ui.tabs.js
  3. +1 −1 ui/jquery.ui.widget.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" );

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

0 comments on commit 57fe6ed

Please sign in to comment.
You can’t perform that action at this time.