I try to make a toggle button where my image (an arrow) will be rotated by 180 degrees each click:
You may write like this. demo
jQuery(document).ready(function(){ var deg_temp =45; jQuery("#image1").click(function(){ deg_temp = deg_temp+30; jQuery(this).rotate(deg_temp); }) });