Jump to content
Search Community

CarlosMav

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by CarlosMav

  1. Ok, at the risk of beign too noob... and this is a JS Question but still,

     

    I have a website of 4 pages all with different animations via JS, and i have all my JS on one document (custom.js).

     

    The error was thrown on the page that doesnt have the .st1 class, but, why is this code running if there is not a .st1?? i thought JS will run only what is on the current page DOM. 

     

    I ask because i have been making this for years on several websites i own and never give me an error until i used SplitText yesterday.

  2. Thank you all, you were right there is not .st1 in the DOM, something is wrong elsewhere in the code, i will check it more thoroughly. I just didnt understand the error, now i know where to look.

     

    Merry Christmas to all the community btw.

     

    Cheers.

  3. Hi, im using split text, this is my code:
     

    var tl = new TimelineLite({delay:0.9}), 
        mySplitText = new SplitText(jQuery('.st1'), {type:"words,chars"}), 
        chars = mySplitText.chars; //an array of all the divs that wrap each character
    
    TweenLite.set(jQuery('.st1'), {perspective:400});
    jQuery('.st1').css("opacity","1");
    tl.staggerFrom(chars, 0.8, {opacity:0, scale:0, y:80, rotationX:180, transformOrigin:"0% 50% -50",  ease:Back.easeOut}, 0.01, allDone);
    
    function allDone(){
      mySplitText.revert();
    }
    

    And it is giving me this error:

    Uncaught TypeError: Object [object Object] has no method 'getElementsByTagName'

     

    on splittext.min.js

     

    I know it has to be something silly but i just cant see it.

     

    A fresh eyes on the problem could help me.

     

    Thank you.

     

×
×
  • Create New...