This script checks for the existence of class hide-bar
in id header
when loading the page when the class is not yet added to it. I need to find a solution so that as soon as the class is added to the id that is exactly when there is a page scroll, the script runs.
jQuery(function($){
$( "#header", function() {
//////////////////////////////////////////////
if ( $("#header").hasClass("hide-bar") ){
alert("A classe está adicionada.");
}
});
});