I have a div class="modal-load" with a counter loader that will be shown when the user finishes a payment, but I need this counter to start only when < .active in it. For this, I created a function in JS that runs this load. I believe this function should be run only after receiving the informed class.
I tested it as follows:
$(document).ready(function() {
if ($(".modal-load").hasClass('ativo')) {
startLoader();
}
});
When I leave the class already inline and refresh the page works perfectly. However, when I leave to add the class by the console, nothing done!