jQuery - Simple show and hide toggle
Search
Tag Search
301 redirect
html
flash
plugin
javascript
AJAX
php
client-side
hand drawing
svn
thickbox
print design
art
regular expressions
seo
regex
bugs
apache
disable cache
action script
car
cache
htaccess
subdomain
jquery
Recently Added
- HTML [3 items]
- SVN (Subversion) [3 items]
- jQuery [10 items]
- PHP [4 items]
Most Popular
- jQuery [10 items]
- PHP [4 items]
- SVN (Subversion) [3 items]
- HTML [3 items]
Member Options
07
Aug
Created by: robilim - Date Added: 7th August 2009 - 0 Responses
Welcome to the first ever tutorial that I have done. I though I'd start with something simple. HTML wise you will need a link and a div box. The link will need an id attribute of 'click-item' and the div will need an id attribute of 'show-hide'.
$("#click-item").click(function(){
$("#show-hide").toggle();
});
<div id="show-hide"> Show-Hide Me </div> <p><a id="click-item">Show-Hide</a></p>
Demo:
Show-Hide Me

