Jump to content
Search Community

cmuadamson

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by cmuadamson

  1. Hello,

      I'm working with TweenLite to change an image's attributes. I've found that if I use a .to() to change the "src" attribute of an image, and the filename is something like "a1-1.png", then the .to() operation inserts a comma into the filename!? It comes out "a1,-1.png". This may happen with other attributes for other tags, but I ran into it with img-src.  Here is a short example that uses jquery v2.2.2 and TweenMax to move values around:

     

    <body>
    <p>The src of the image is to be changed to "<span id="imagesrc1"></span>".</p>
    <p>When that is copied in with TweenLite.to(), it becomes "<span id="imagesrc2"></span>" with a comma in it.</p>

    <img src="a1-1.png" id="image1" />

    <script>
      // Get the src of image1
      var src1="a1-2.png";
      $('#imagesrc1').html(src1);

      // Use TweenLite to change the src of the image to that value
      TweenLite.to($("#image1"), 0, {src: src1});

      // Now get the image's src value
      var src2=$('#image1').attr('src');

      // Display the two values. src2 got a comma from TweenLite
      $('#imagesrc2').html(src2);
    </script>

    </body>
     

     

    I am working with TweenMax.min_1.18.2.js on a Firefox browser. Using the DOM inspector of the browser, the image src is seen to be the value with a comma in it -- this isn't jquery misreading it. Anyone else able to reproduce this?  Debug it?

     

    Thanks,

        -Mark

     

     

×
×
  • Create New...