I'd like a button to rotate an element 5 additional degrees each time it's clicked. I've been able to do this sort of thing with border width with something like
$(document).on('click', '.brdr_width_up', function() {
$(ws.currentCell).css({'border-top-width' : '+=1', 'border-right-width' : '+=1','border-bottom-width' : '+=1','border-left-width' : '+=1'});
});
But the same idea doesn't seem to work with transform:rotate:
$(document).on('click', '.rotate_cw', function() {
$(ws.currentCell).css({'-webkit-transform': 'rotate(+=5deg)'});
$(ws.currentCell).css({'-moz-transform': 'rotate(+=5deg)'});
var deg = $(ws.currentCell).css({'-moz-transform': 'rotate()'});
});
And the var line above doesn't bring back the current rotation so that I could add to it.
Does anyone know a way to do this?
Thanks