Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #66 from pappy74/global-ensure

Added ability to set a global "data-ensure" on the parent VARS element.
  • Loading branch information...
commit 426974984da70f7764bc4db3ece05f2caa749738 2 parents 3c5f9f8 + a5ab019
@jeresig jeresig authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 utils/math.js
View
5 utils/math.js
@@ -248,6 +248,7 @@ jQuery.fn.extend({
}
var ensureFailed;
+ var globalEnsure = vars.data("ensure");
do {
ensureFailed = false;
// Go through the specified variables
@@ -270,6 +271,10 @@ jQuery.fn.extend({
ensureFailed = ensureFailed ||
( (jQuery(this).data("ensure") && !jQuery.getVAR( jQuery(this).data("ensure") ) ) );
});
+
+ // check the global ensure
+ ensureFailed = ensureFailed ||
+ (globalEnsure && !jQuery.getVAR( globalEnsure ));
} while (ensureFailed);
return this;
Please sign in to comment.
Something went wrong with that request. Please try again.