I am setting up a page with a vector couch on the right and on mouseover it will slide out. My goal is to have my content to the left of the couch slide off to the left of the page.
Would I need to set my elements to absolute to have then slider over? I will probably be using animate() to move the couch out adjusting the right css property.
By default will it slide off to the left?
Any ideas on this, i know how to do something to slide it out, but not sure how to make the content slide off to the left of the page.
Example HTML structure: http://pastie.org/458876
NEW CODE:
$(document).ready(function() {
$('#slidemarginleft button').click(function() {
var $marginLefty = $(this).next();
$marginLefty.animate({
marginLeft: parseInt($marginLefty.css('marginLeft'),10) == 0 ?
$marginLefty.outerWidth() :
0
});
});
});
Say i use this code above to move the couch left to right
Thanks,
Ryan