Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
44
rated 0 times [  48] [ 4]  / answers: 1 / hits: 102586  / 13 Years ago, fri, november 11, 2011, 12:00:00

I am looking to create a slide out DIV, like the one here when you press Contact. Does anybody know of anything similar to this?


More From » html

 Answers
9

Making use jQuery's slideToggle() method could help you do this.



Example



HTML:



<div id=contact>
Contact me!
</div>
<a href=# id=toggle>Contact</a>


CSS:



#contact
{
display: none;
background: grey;
color: #FFF;
padding: 10px;
}


JavaScript:



$(function()
{
$(a#toggle).click(function()
{
$(#contact).slideToggle();
return false;
});
});

[#89167] Thursday, November 10, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
milo

Total Points: 62
Total Questions: 99
Total Answers: 97

Location: Sweden
Member since Mon, May 8, 2023
1 Year ago
;