Recent twitter entries...

  •  

Jquery Hide/Show div toggle (revisited)

Posted by admin | Posted in jquery | Posted on 11-02-2010

0

As James rightly pointed out this was filled with errors in Internet Explorer.

Revisited to use toggle – anyone have any problems let me know.

Little jquery script to open a tab panel on your site simple but effective.
live demo here






 





Your hidden content goes here!!2

contact_button

Your main content goes here

Main content

Thats it a bit of css and your all set – let me know if you use it. Ideally you’d set the close and open buttons to preload to avoid any jerkiness.

Download all files

Jquery reveal panel (top) to show contact details

Posted by admin | Posted in jquery | Posted on 11-08-2009

2

Little jquery script to open a tab panel on your site simple but effective.
live demo here

<script  >
$(document).ready(function(){
$("#contactimg").live("click", function(){
$("#contact").html("<p id='closebox'>Close Contact</p>");
$("#contact").html('<img src="image_top/close.jpg" id="closebox"/>');
$(".contact_hidden").animate({ height: "200px",}, 1500 );
})
$("#closebox").live("click", function(){
$("#contact").html('<img src="image_top/contact_button.png" id="contactimg"/>');
$(".contact_hidden").animate({ height: "0px",}, 1500 );
})
});

</script>
//and then some html ..
<div class="contact_hidden">
><h2> Your hidden content goes here!!</h2>
</div>
<div class="main">
<div class="contact" id="contact">
<img src="image_top/contact_button.png" alt="contact_button" id="contactimg"/>
</div>

<h2> Your main content goes here</h2><br /><br />
<p>Main content</p>
</div>

Thats it a bit of css and your all set – let me know if you use it. Ideally you’d set the close and open buttons to preload to avoid any jerkiness.
Download all files