dimanche 28 août 2016

How does .waypoint work?

If a have a code like this

        var waypoint = new Waypoint({
element:document.getElementsByClassName  ('waypoint'),
 handler: function(direction) {
 console.log('Scrolled to waypoint!')
  }
})

And I have 10 elements that have 'waypoint' class,how does waypoint plugin control if those elements are visible in viewport?Does it control all div's offsets every time onscroll event is triggered?

Aucun commentaire:

Enregistrer un commentaire