I can't seem to work this out despite crawling the web and trying different things, I'm trying to create 4 boxes that would slide up (previously hidden) to display content in this div followed in succession when the page loads. I want them to stay open so I don't need a close feature.
Hi,
By searching the web I've found a way to have multi divs slideout
from the left but I can't figure out how to toggle them i.e. when
one div is clicked the previous opened divs closes. This my jQuery so
far, would appreciate someone's help thank you.
jQuery(function($) {
// jQuery 1.9 > Toggle Event dep 1.8
$('#slideClick').click(function() {
var it = $(this).data('it') || 1;
switch ( it ) {
case 1 :
$(this).parent().animate({left:'0px'},
{queue:false, duration: 500});
break;
case 2 :
$(this).parent().animate({left:'-290px'},
{queue: false, duration: 500});
break;
}
it++;
if(it > 2) it = 1;
$(this).data('it', it);
})