Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var rotation = 0;
- jQuery.fn.rotate = function(degrees) {
- $(this).css({'transform' : 'rotate('+ degrees +'deg)'});
- return $(this);
- };
- $('.rotate').click(function() {
- rotation += 5;
- $(this).rotate(rotation);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement