INNER CODE UNIT · JavaScript
checkValue
vasani-arpit/Social-Media-Automation · libs/numberAnimate.js:79
var checkValue = function (str) {
//check there are no odd chars first..
for (var i = 0, len = str.length; i < len; i++) {
if (allChars.indexOf(str.charAt(i)) < 0) {
$.error("numberAnimate plugin requires that value used " +
"only contain character in: \"" + allChars + "\"");
return false;
}
}
return true;
};
//Given a div which holder a character, it shift it to the required character,
//note, the givenholder div should be attached prior to calling this for the animation
//to take effect..
var shiftToChar = function ($holderDiv, character, shiftTime) {
var innerStyle = $holderDiv.children()[0].style;
innerStyle[css3Prefix + 'Transition'] = "all " + shiftTime + "ms ease-in-out";