Chad
Chad

Reputation: 103

how would I removeClass after a certain div is loaded on a page?

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

Answers (1)

James Montagne
James Montagne

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

Related Questions