Jump to content

Sliding Div Right to Left


Solarpitch

Recommended Posts

Hey,

 

I have the following code that slides a div from left to right when you click on #Link. This works fine but when I click it again I want to slide it exactly the same from right to left. Problem with this is it just keeps sliding it right everytime I click the link.

 

Tried using toggle but no matter what margin value I had specified, it slid the div right off the page.

 

	$(document).ready(function(){

	$('#link').click(function() {
	$('.hidediv').animate({'marginRight' : "-=295px"}, 300);
	    return false;
	});

	});

Link to comment
https://forums.phpfreaks.com/topic/246169-sliding-div-right-to-left/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.