Sliding Panels with JavaScript

kurruptt

New Member
This example I've found is exactly what I was looking for: http://jsfiddle.net/sg3s/RZpbK/
Thx to the author sg3s\[code\]jQuery(function($) { $('a.panel').click(function() { var $target = $($(this).attr('href')), $other = $target.siblings('.active'), animIn = function () { $target.addClass('active').show().css({ right: -($target.width()) }).animate({ left: 0 }, 500); }; if (!$target.hasClass('active') && $other.length > 0) { $other.each(function(index, self) { var $this = $(this); $this.removeClass('active').animate({ left: -$this.width() }, 500, animIn); }); } else if (!$target.hasClass('active')) { animIn(); } });});\[/code\]But I got a little problem with it. I would like the panels to "open" and "close" from the right. I'm not familiar with javascript and I'm not able to tweak it properly.Can anyone help me with this ?
 
Back
Top