jQuery SlideOut Function from Right to Left
css, html, javascript, jquery
Solution
just see this link it will be useful http://www.learningjquery.com/2009/02/slide-elements-in-different-directions
or use this
$("div").click(function () {
$(this).show("slide", { direction: "left" }, 1000);
});
Reference: http://docs.jquery.com/UI/Effects/Slide
Problem
I am trying to slideout function from rightside in jQuery, by changing the code for "From Left to Right" but it's not functioning correctly... Can u please give me the right direction to modify... http://jsfiddle.net/egUHv/ Presently I am using this code... ``` $(function() { $('#nav').stop().animate({'marginRight':'-100px'},1000); function toggleDivs() { var $inner = $("#nav"); if ($inner.position().right == "-100px") { $inner.animate({right: 0}); $(".nav-btn").html('<img src="images/slide-out.png" alt="open" />') } else { $inner.animate({right: "100px"}); $(".nav-btn").html('<img src="images/slide-out.png" alt="close" />') } } $(".nav-btn").bind("click", function(){ toggleDivs(); }); }); ```