INNER CODE UNIT · JavaScript
bindToTransitionEndForSingleRun
vasani-arpit/Social-Media-Automation · libs/numberAnimate.js:61
var bindToTransitionEndForSingleRun = function ($el, funcToExec, maxMSTillTransitionEnd) {
var firedFunc = false;
var wrappedFunc = function () {
funcToExec();
firedFunc = true;
$el.unbind(transitionEndEvent, wrappedFunc);
};
$el.bind(transitionEndEvent, wrappedFunc);
setTimeout(function () {
if (!firedFunc) wrappedFunc();
}, maxMSTillTransitionEnd + 100);
};
//all allowed characters (note: you get a bizzare error in Opera and IE
//if the non-digit characters are at the end for some reason)..
var allChars = ', . - + 0 1 2 3 4 5 6 7 8 9';
//checks that the given value makes sense to use..