rotating an image in a canvas in jquery -
i have canvas , contains 5 images having different id named img1, img2, img3, img4 , img5. using jquery slider. if change rotation in slider image rotated assigned slider. in case, able create multiple sliders if make rotation in 1 of sliders, image having id img5 changing not exact image slider. in short, sliders assigning last image. code like:
$('.slider').slider({ orientation : 'horizontal', max:180, min:-180, value:0, id:objid, slide: function(event, ui) { var $this = $(this); /* change rotation , register value in data object when stops */ draggable_elem.css({'-moz-transform':'rotate('+ui.value+'deg)','-webkit-transform':'rotate('+ui.value+'deg)'}); $('.degrees',$this).html(ui.value); }, stop:function(event, ui) { newobject.rotation = ui.value; } });
whereas objid
id of image.
please advice, how distinguish image 1 slider. in advance.
Comments
Post a Comment