Streaming live at 10am (PST)

Need help with Waypoint.js integration


#1

Why this script doesn't work at my site??!!

It should be so easy but it seems that Webflow blocks it!!!

<script src="http://intelligence-group.ru/materials/jquery.waypoints.js"></script>
<script>
var waypoint = new Waypoint({
  element: document.getElementById('#newnew'),
  handler: function() {
  	console.log('Scrolled to waypoint!')
  }
})
</script>

Any other scripts that call JS function when an element scrolls into view don't work too!

WEBFLOW TEAM PLEASE HELP! Only you can help it!


#2

Hi, @Peter_Potapov, it looks like there is a problem with the call to waypoint:

Looking at the example script, the element id is not passed with the hashtag, I would try the code below instead:

<script src="http://intelligence-group.ru/materials/jquery.waypoints.js"></script>
<script>
var waypoint = new Waypoint({
  element: document.getElementById('newnew'),
  handler: function() {
  	console.log('Scrolled to waypoint!')
  }
})
</script>

There may be other issues, but check that first.


#3