How to move and expand a div?
Hi guys,
I was hoping someone could help me, a Jquery beginner, with a problem.
I would like to have 4 small "preview" div's on my webpage. Which when you click them will move downward and then expand. I hope to achieve the effect of having small previews on a page which will move to the middle and expand when you click them.
Now as I said I'm really quite new to Jquery so I was wondering if anyone could point me in the right direction on how to achieve this?
I got asfar as this:
<script>
$("#div1").click(function(){
$("#div1").animate({
width: "400px",
height: "300px",
borderWidth: "10px",
top: "50px;"
}, 1500 );
});
</script>
However this only has the effect of expanding the Div, not moving it.
Any help would be greatly appreciated!
Cheers!