Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("figure").on("click","img",function(){
- if (typeof $("x").data('x' !== 'undefined')){
- $(this).data("x",0);
- }else{
- $(this).data().x+=1;
- }
- switch($(this).data("x")){
- case 0:
- $(this).css("filter","sepia(100%)");
- break;
- case 1:
- $(this).css("filter","grayscale(100%)");
- break;
- case 2:
- $(this).css("transform","rotate(180deg)");
- break;
- default:
- $(this).css("filter","");
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement