Reputation: 103
I'm wondering how I can remove a certain class after a specific div is loaded on a page. Does anyone know the appropriate way to do this using jquery?
I'm using a special class for loading and would like it removed on the div once the div has loaded.
Upvotes: 1
Views: 6937
Reputation: 78650
Since you are not using AJAX, simply use removeClass
and put the code in $(document).ready
so that it won't execute until the dom is loaded.
$(document).ready(function(){
$("#myElement").removeClass("someClass");
});
Upvotes: 7