Scaling and centering an object with a slider
Hi All,
I have a slider that proportionately scales a div on slide event eg:
$("#my_slider").slider({
min: 100,
max:2900,
value: 780,
slide: function(event, ui){
$("#mydiv").css("width", ui.value);
$("#mydiv").css("height", ui.value);
},
});
I want the object Im scaling to also move the div so that it looks
like its being scaled from the center (and not the top left)
Is there an easy way to do this?
Thanks :)
--