Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

ScrollMagic isn't working

scroll magic

This topic has been archived. This means that you cannot reply to this topic.
No replies to this topic

#1 as12AS


    CC Lurker

  • Just Joined
  • Pip
  • 1 posts

Posted 16 February 2016 - 01:02 PM

Using Netbeans PHP module, so here's the code, nothing's happening. It's actually the tutorial's code, which I attempted to replicate from the link (https://github.com/j...use-ScrollMagic) - I haven't gotten through all of this page, but it seems I'm already stuck going through a couple of initial steps.

I've made sure all the appropriate files are added via src. The alerts are in there for testing if the code works, but apparently none of them showed up. So I'm here a bit dumbfounded.


        <script src="path/to/js/gsap/TweenMax.min.js"></script>
        <script src="path/to/js/jquery-2.2.0.min.js"></script>
        <!-- should be replaced with minified version when development is finished -->
        <script src="path/to/js/jquery.scrollmagic.js"></script>
        <!-- should be removed when development is finished -->
        <script src="path/to/js/debug.addIndicators.js"></script>
            var controller = new ScrollMagic.Controller();
            var scene = new ScrollMagic.Scene();
            alert("it's happening")
            var scene = new ScrollMagic.Scene({
                alert("it's working")
                triggerElement: '#pinned-trigger1', // starting scene, when reaching this element
                duration: 400 // pin the element for a total of 400px
                    .setPin('#pinned-element1'); // the element we want to pin
            alert("This has happened")
            // Add Scene to ScrollMagic Controller


Thank you very much for your time and help in advance.


I highly appreciate it.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download