As per my code written below I think when I scroll to the .onscrollActivate div alert should come. But it is not giving me the alert.
<div class="waypoint" style="width:100%;height:300px;"></div>
$(document).ready(function(){
$('.onscrollActivate').waypoint(function() {
alert();
});
});
If I try .click() instead, it gives me the alert message.so my jquery is fine.
So, where am I going wrong?
As you see waypoint is not a function error in console, you haven't loaded the waypoint library on your page.
Include waypoint js on the page after jQuery.
<script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/2.0.5/waypoints.min.js"></script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With