/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Hide/show through javascript

Hi,

I have done the hide/show divs using javascript.Its working fine but the problem is that at the time of page loading the hidden divs are showing first anf then disappearing.

Is there any way not to show the hidden elements even if the page loads for first time

Thanks,

Raj

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@cbVisionJun 14.2011 — You can use CSS to hide them to ensure they aren't displayed ... then use JavaScript to display them when needed.

You could also use jQuery's $(document).ready function which executes faster than the typical JavaScript body onload function.
Copy linkTweet thisAlerts:
@wbportJun 14.2011 — Does this earlier thread help?
Copy linkTweet thisAlerts:
@raj_2006authorJun 14.2011 — @cbVision...Yes I have applied the first method....Thanks

@wbport Thanks for the link.Its helped me a lot...Thanks
×

Success!

Help @raj_2006 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...