Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery code messing up rest of code Reply To: jQuery code messing up rest of code

#208318
Max
Participant

I fixed this by using a different method of calling Waypoints which worked for my situation, eg.:

`
var waypoints = $(‘.coaching-section-3’).waypoint({
handler: function(direction) {
if (direction === ‘down’) {
$(‘.coaching-bg-private-video’).get(0).pause();
$(‘.coaching-bg-junior-video’).get(0).play();
}
if (direction === ‘up’) {
$(‘.coaching-bg-private-video’).get(0).play();
$(‘.coaching-bg-junior-video’).get(0).pause();
}
},
offset: ‘30%’
})
`