elements - jQuery How to Hide DIVs, they are Showing for a Split Second on page Load -


I have created a very quick jquery slideshow, and I'm using this to hide the HIV, which then It is clearly their turn not to show:

  $ (document) .ready (function () {// First hide from $ ('div # gall2') all div Except Hide (); $ ('("Div # gall3') Hide (); $ ('div # gall4'). Hide ();  

On doing this you can see the div2 gall3 and gall4 for a partition

  # gall2, # gall3, # gall4 {display:  

The CSS is okay to disable it, but without the JS users will never see them.

To disable only users with JS, mark the body and appropriate CSS:

  & lt; body & gt; & lt; script type = "text / javascript t"> document.body.className + = "js"; & lt; / script & Gt;  

CSS:

  .js # gall2, .js # gall3, .js # gall4 {display: none; }  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -