javascript - jquery show not defaulting to hidden -


I have a very easy jQuery example: and that works properly in JSW like I want when I I apply it to a webpage with very little difference in code, except for some preceding content, the jquery section is the default to show content in a hidden device, it works even when I click on hide and there I can show right and right Can hide, but I wish that when I start webpage.

Is there any reason you can think about? /p>

If you have problems, do you use a blanket CSS rule for all none

  $ ("# box1, # box2"). Wrap ();   

... or change your CSS rule:

  div # box1, div # box2 {background: # def3ca; Margin: 3px; Width: 80px; display none; Swim left; Text-align: center; }   

... or add your inline with your html:

  & lt; Div id = "box1" style = "display: none" & gt;    

Comments