Jump to content
Search Community

Jimbo1900

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Jimbo1900

  1. Hi Carl,

     

    Thanks for the welcome!

     

    I actually have a new problem, I can't figure out. The url is:

    http://jpf.jp22.net/1.htm

     

    I have 3 buttons that respond to click events and the last button should bring the image back to its original size. However the image keeps getting larger. I used some proprietary tags inside the <img> so as to always get back the original size. I want variables here not fixed numbers.

     

    I also send the values of iw and ih to the console.log and they never change, which is good thing.

     

    But something is still wrong?

     

    Jim

  2. OK I figured out the problem. I was trying to tween the div tag and not the image tag. So rewriting just the contents inside the body tags:

     

    <div>

    <img id="photo" src="tel.jpg" width="200" height="150"/>

    </div>

    <script>

    var photo1 = document.getElementById("photo");

    //or use jQuery's $("#photo")

    console.log(photo1);

    TweenMax.to(photo1, 18.5, {width:80});

    </script>

     

    Notice the id attribute is now part of the image itself and no longer the div tag. I hope this helps someone else.

     

    Jim

  3. Hi,

     

    I have the following code:

     

    <!DOCTYPE html>

    <html lang="en">

    <head>

     

    <script type="text/javascript" src="js/TweenMax.min.js"></script>

    <title>1</title>

     

    </head>

     

    <body>

     

    <div id="photo">

    <img src="tel.jpg" width="200" height="150"/>

     

    </div>

     

    <script>

    var photo1 = document.getElementById("photo");

    //or use jQuery's $("#photo")

    console.log(photo1);

    TweenMax.to(photo1, 8.5, {width : 80});

    </script>

    </body>

    </html>

     

    And all resources are found via google chrome dev tools, however nothing happens. This example is right off the getting started page. What could be the problem?

     

    Thanks,

    Jim

×
×
  • Create New...