+ 3

Need help as quick as possible

How to make an image rotate every time it is clicked using CSS or JQuery .

23rd Jun 2017, 11:33 AM
RZK 022
RZK 022 - avatar
5 Antworten
+ 4
thanks @Amir
23rd Jun 2017, 3:22 PM
RZK 022
RZK 022 - avatar
+ 3
this is one of my codes make it rotate every time I click it. https://code.sololearn.com/WFzA7FSR96Ic/?ref=app
23rd Jun 2017, 2:38 PM
RZK 022
RZK 022 - avatar
+ 2
this is one of my codes make it rotate every time I click it.
23rd Jun 2017, 2:37 PM
RZK 022
RZK 022 - avatar
+ 1
This should work: $("img").click(function() { $(this).rotate(45); }); or $('img').click(function(){ $(this).css({ "transform": "rotate(90deg)" }); });
23rd Jun 2017, 12:29 PM
Felipe Cruz
Felipe Cruz - avatar
23rd Jun 2017, 12:54 PM
Calviղ
Calviղ - avatar