Home › Forums › JavaScript › jQuery code messing up rest of code › Reply To: jQuery code messing up rest of code
September 17, 2015 at 1:13 pm
#208318
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%’
})
`