0

I'm aware that I'm not the first person asking this question, but I looked at other topics and I was unable to find answer.

http://jsfiddle.net/rsadwick/zwWHY/

My code is working in JSFiddle but not in Chrome or Firefox. The missing part is the flipping; I see the page with the card (back side in Firefox and front side in Chrome) but I cannot flip it the way I do it in JSFiddle. Any ideas?

   $('.flip').click(function(){
        $(this).find('.card').addClass('flipped').mouseleave(function(){
            $(this).removeClass('flipped');
        });
        return false;
    });
  • 1
    "JSFiddle but not in Chrome or Firefox" — I think you are confusing the tool you use to view the webpage with the tool you use to make the webpage there. – Quentin Apr 23 '16 at 21:57
  • I believe I'm not. I've written the code on my computer and tried executing it in both Chrome and Firefox. Since the output was wrong I decided to test it in JSFiddle as well and there it was working. And I have no idea why is that happening. – femme fatale Apr 23 '16 at 21:59
  • 1
    What are you using to test the code on JS Fiddle if it isn't Chrome or Firefox? – Quentin Apr 23 '16 at 22:00
  • What I ment was that when I tested in on the webpage JSFiddle it worked. When I tested it with the path like file:///C:/studia/4%20semestr/TI/projekt1/projekt_v1/test.html it did not. – femme fatale Apr 23 '16 at 22:01
  • 1
    Which is my point. – Quentin Apr 23 '16 at 22:03

0 Answers0