...

View Full Version : jQuery slideToggle query



camphor
10-25-2010, 06:23 PM
Hi All,

Which is the correct code for the jquery slideToggle effect, I have looked on youtube as well as the jquery website and there seems to be different ways of coding this effect. Any help appreciated

Thanks

SB65
10-25-2010, 07:47 PM
Don't trust YouTube. Trust jQuery.com (http://api.jquery.com/slideToggle/). A simple usage would be something like:


$('#click_here').click(function() {
$('#slide_element').slideToggle();
});


This would assign a click event to the element #click_here, causing the element #slide_element to toggle in/out of view with a sliding animation.

camphor
10-26-2010, 07:09 PM
thanks sb65,

should I need any more help, can I get in contact with you via this forum



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum