I want something that finds instantly on the page a class called prop and set it to hidden soon as there is one.
IMPORTANT: soon as a new element is added I want that element with prop class changed. Like a while loop
if( class='prop' == found ){
set class to ('hidden');
}
And yes this function is inserted after the element caller. but it seems like it takes some time till the element is generated so I need a check on the class to remove it as fast as possible. I cant use a delay in this case have tried that with bad results.
You need hasClass function
if($('selector').hasClass('prop'))
{
$(this).removeClass("prop");
$(this).addClass("hidden");
}
This might help
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With