animo.js
animo.js copied to clipboard
Problem with cleanse function, solution
The cleanse function is passing a possibly undefined value into JQuery's .removeClass() function - This is causing a complete removal of all classes, and has caused some rather annoying behavior. Anyways, this is solved by changing the direct call to something like:
if(this.element.data("animo") != undefined) this.element.removeClass(this.element.data("animo"));
:+1:
Just had exactly this problem with the cleanse function stripping out all my non-animo classes. Thanks for the solution, hopefully this will be implemented.
Thanks @jordanchapian. I'll get this up within the next couple of days. Unless you have a pull request you want to submit
Not a problem - I'll submit tonight.
Found this thread after figuring out what the problem was ))
@jordanchapian , thanks for solution.. just for your information on your fork, you have removed the code but i guess mistakenly made another line..
For those looking for solution in animo.js cleanse function should look like this:
cleanse: function() {
this.element.removeClass('animated');
this.element.removeClass(this.queue[0]);
var ai = this.prefixes.length;
while(ai--) {
...