Click to keep expanding size of div
Hi,
I have a div which I want to increase in pixel size by 10px each time a button is checked. The change in size needs to be animated. At the moment, I can only get it to increase to a fixed dimension:
-
$(document).ready(function(){
$("#expand").click(function(){
$(".my-div").animate({
width: "10px"
},1000);
});
});
How do I get it to keep expanding by 10px each click? My Javascript/jQuery isn't great, so sorry if this is really simple!
Thanks all...