function tranImg(trun){ $('#imgTest').each(function(){ var me = $(this); me.current=!me.current&&me.current!=0?0:me.current; me.current = (me.current+trun)%360; imgObj.style.transform = 'rotate('+current+'deg)'; $(this).css("transform"); });}