problem with js flip animation

Discussion in 'JavaScript' started by saturn100, Sep 11, 2014.

  1. #1
    Hi
    I am trying to implement this effect found on jsfiddle
    http://jsfiddle.net/walidvb/UDctX/

    But its not working for me
    I have had some issues with copying and pasting js from jsfiddle before and cant remember how I fixed it

    Here is my code html page with the js inside it


    
    <!DOCTYPE html>
    <html>
    <head>
    <title>flip.</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript" >
    
    $(".cont").click(function(){
     $(this).toggleClass("rotator")  ;
    })
    
    
    </script>
    <link rel="stylesheet" href="flip.css">
    
    </head>
    <body>
    <div class="cont">
      <img class="image" src="http://www.verawolf.com/themes/hammerhead/images/bracelets.jpg">
      <div class="info"> Vera Wolf Bracelets Collection - Click here to check our bracelets collection..... </div>
    </div>
    </body>
    </html>
    
    Code (markup):
     
    saturn100, Sep 11, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    You haven't included the jquery framework, which the example is based on.
     
    PoPSiCLe, Sep 11, 2014 IP