Jump to content
Search Community

Joomla Issues

error404 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi Everyone,

 

 

I have been trying to set GSAP on a Joomla website. Well, was able to make it work with the quote below BUT with issues, now the trigger always start way before it should. It starts at the beginning of the page instead of at the orange div start like in the doc example. 


<script type="text/javascript">

        jQuery(document).ready(function() {
        	var controller = new ScrollMagic.Controller();

  var blockTween = new TweenMax.to("scblock", 1.5, {
    backgroundColor: '#f1f1f1f1'});

  var containerScene = new ScrollMagic.Scene({
      triggerElement: 'sccontainer'
    })
    .setTween(blockTween)
    .addIndicators()
    .addTo(controller);
      
        }); //ready
        
</script>

This code was taken out from the doc example at https://github.com/janpaepke/ScrollMagic/wiki/Get-Started-First-Tween

the only difference is that the CSS id to work in Joomla can't include the '#' like already reported on a different topic within this forum.

There are no errors showing on the Chrome and/or Firefox Firebug console.

 

 

Take a look at the attached image to see what I mean.

 

 

 

Anyideas on why this is happening?

 

 

Thanks for the help guys :)

 

 

post-37140-0-89237100-1435719520_thumb.jpg

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

Seems the code you are referencing is from the ScrollMagic repo. I think the ScrollMagic folks will probably be able to explain it better.

Try posting your issue here: https://github.com/janpaepke/ScrollMagic/issues

 

I just don't have a lot of personal experience with the ScrollMagic API (Lots of folks love it and have had great success). 

 

I'm sure a CodePen demo (like this guy made)  would be helpful too. At the very least that would take Joomla out of the equation and it would be cool to see if things work that way. 

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

Seems the code you are referencing is from the ScrollMagic repo. I think the ScrollMagic folks will probably be able to explain it better.

Try posting your issue here: https://github.com/janpaepke/ScrollMagic/issues

 

I just don't have a lot of personal experience with the ScrollMagic API (Lots of folks love it and have had great success). 

 

I'm sure a CodePen demo (

See the Pen oXGdJM by thomasflad (@thomasflad) on CodePen

)  would be helpful too. At the very least that would take Joomla out of the equation and it would be cool to see if things work that way. 

 

 

Thanks, will do that and get back here with their answer (hopefully they have one )

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...