Results 1 to 5 of 5

Thread: jquery rotate don't work

  1. #1
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default jquery rotate don't work

    Hi, i have problem implementing this example to the website:
    http://code.google.com/p/jqueryrotat.../Documentation

    this is my code:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="jQueryRotateCompressed.2.1.js"></script>
    <script>
    $(document).ready(function() {
    	$("#img").rotate(45);
    })
    </script>
    </head>
    
    <body>
    <img src="dl_arrow.png" id="img" />
    </body>
    </html>
    any idea, what's wrong with my script? Thanks
    _____________________

    David Demetrius // davejob
    _____________________

  2. #2
    Join Date
    Jan 2012
    Posts
    21
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by davelf View Post
    Hi, i have problem implementing this example to the website:
    http://code.google.com/p/jqueryrotat.../Documentation

    this is my code:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <script src="jQueryRotateCompressed.2.1.js"></script>
    <script>
    $(document).ready(function() {
    	$("#img").rotate(45);
    })
    </script>
    </head>
    
    <body>
    <img src="dl_arrow.png" id="img" />
    </body>
    </html>
    any idea, what's wrong with my script? Thanks
    well your code seems missing parts, as I guess you should first get jquery call then use it, because this one depend on it then apply your rotate script. so check this if its work with you:
    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <!-- you can download it then apply at script or you could just import it from google library 
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
    -->
    <script type="text/javascript" src="jquery.js"></script>
    
    <script type="text/javascript" src="jQueryRotateCompressed.2.1.js"></script>
    <script>
    $(document).ready(function() {
    	$("#img").rotate(45);
    })
    </script>
    </head>
    
    <body>
    <img src="dl_arrow.png" id="img" />
    </body>
    </html>

  3. #3
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    any other idea?
    _____________________

    David Demetrius // davejob
    _____________________

  4. #4
    Join Date
    Jan 2012
    Posts
    21
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    well you could also try to assign selector to id instead of img:
    Code:
    <script type="text/javascript">
    $(document).ready(function() {
    	$("#i").rotate(45);
    })
    </script>
    </head>
    
    <body>
    <img id="i" src="dl_arrow.png" id="img" />
    </body>
    </html>
    hope this help

  5. #5
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    Hi hosam, thanks for your reply. But there's nothing happen even i change the "id".

    Have you open this site and try it: http://code.google.com/p/jqueryrotat.../Documentation

    And is that code you gave me really work, base on what you already try from that site tutorial. Seriously just change the "id"???
    _____________________

    David Demetrius // davejob
    _____________________

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •