?
Solved

First toggling - slideToggle() - on page load

Posted on 2010-01-11
2
Medium Priority
?
469 Views
Last Modified: 2012-05-08
I am using slidetoggle() with jquery to hide and show my menus on click. If you go to ryanbent.com you will see the top links, the items: contact, portfolio, and about, have slidetoggle. If you notice on page load, they are all DISPLAYED.

Check this by adding display:block to #fuzz, the gray light out.

So I thought this would work:
$('#about-pull,#portfolio-pull,#contact-pull').slideToggle();

I have this within document.ready and it doesnt run, but if I use FireBug and run it via Scirpt, it works fine.

Any ideas?

Thanks,

Ryan
0
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 29

Accepted Solution

by:
David H.H.Lee earned 2000 total points
ID: 26291058
Hi Ryan,
You can use hide() method instead of slideToggle() in page load.
eg:
$('#about-pull,#portfolio-pull,#contact-pull').hide();

Check this link for further details:
http://docs.jquery.com/Effects/hide
0
 
LVL 1

Author Comment

by:catonthecouchproductions
ID: 26310307
Ahhh! Worked perfect.. thank you!

Ryan
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question