Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
138
rated 0 times [  144] [ 6]  / answers: 1 / hits: 18461  / 11 Years ago, wed, november 13, 2013, 12:00:00

I want to hide an specific div class while page is loading. The structure is..



<div id =container>
<div class=project-item tv></div>
<div class=project-item radio></div>
<div class=project-item radio></div>
<div class=project-item tv></div>
</div>


For example, I want to hide DIV with class radio while page is loading, then show them again after load. Thanks.


More From » php

 Answers
132

First, set it's CSS value to display:none



Then, in a Javascript file, the jQuery solution would be to use:



$(document).ready(function() {
$(#yourdivid).show();
});


$(document).ready() makes sure that the entire DOM is loaded before the code inside the function is executed


[#74318] Monday, November 11, 2013, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
beatriceisabelad

Total Points: 710
Total Questions: 107
Total Answers: 99

Location: Cayman Islands
Member since Sat, Sep 17, 2022
2 Years ago
;