I am trying to combine two different actions on my website, and since I'm a beginner in javascript and scrollmagic, I've been struggling to make it all work together. I've managed to make each set of actions work individually. I based my code on the tutorials from Jan Paepke. Here is the link to the page I'm working on :
Multiple scrollmagic actions website
- The first set of actions is a tween to the left and right as you scroll down.
- The second set of actions is simply to be able to have a scrollTo action from each of the the second nav-links (page-nav) to their sections (#tags).
When troubleshooting it, I've noticed that the thing that makes one or the other work exclusively, is if I include the
<script type="text/javascript" src="js/scrollmagic/ScrollMagic.js"></script>
script (which was included in the ScrollTo tutorial. It seems that the former script and the jquery
<script type="text/javascript" src="js/scrollmagic/jquery.scrollmagic.js"></script>
files are stepping on each other's toes so to speak. If one is included and not the other, that's the action which will work on my .html. Anyways, I've been struggling with this for a while and I'm not familiar enough with different jquery.scrollmagic or ScrollMagic.js internal ramifications to solve this.
This would be very helpful to me if you anyone has a solution or thought! I m sure there might be a more straightforward way to get at this but I can't seem to find it online... Thanks,
Adrien