Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

jQuery Basics: Toggle

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
4,770
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jul 9, 2011

The toggle function allows for showing/hiding elements without the need to perform a prior check to see an element's visibility.

WEBSITE
http://phpacademy.org

FORUM
http://phpacademy.org/forum

TWITTER
http://twitter.com/phpacademy

FACEBOOK
http://www.facebook.com/group.php?gid=64583401868

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (23)

Sign In or Sign Up now to post a comment!
  • guys, if it's slides to the left, just use slideToggle instead of toggle

  • thnx

  • THAAAAAAANKS!!! <3

  • simply the best videos

  • how do i always have one showing. so when you click toggle it switches DIV. i only have/want 2 div's.

  • nice vid, ALEX!!!

    

  • @112makoto in javascript the (enter button) a new line in the document is working as a line terminator, but to be sure its always better to use line terminators.

  • @liandrovsk instead of using visibility:hidden, use display:none;. The effect you were looking for is when the page loads the div starts out hidden right?

  • Funny, you didn't put a line terminator at the contact information yet, it still works.

  • @down: make sure that you have included jquery files..

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more