Reputation: 45
I am trying to check for when a class is added to the body but my code isn't working, is anyone able to help me?
function checkFordone() {
if ($("body").hasClass("done")) {
$("#mainbar").addclass("finished");
} else {
setTimeout(checkFordone, 100);
}
}
Upvotes: 0
Views: 54