Good day, I’m trying to teach myself Jquery waypoints and right now i’m having trouble trying to make it work. The idea is once the element is visible on the screen it would display an “alert” saying “this element is visible”. But whenever i scroll down the alert doesn’t seem to appear. Here is a sample of my code.
HTML
<section class="container">
<div class="sixteen columns item"></div>
<div class="sixteen columns item"></div>
<div class="sixteen columns item"></div>
<div class="sixteen columns item"></div>
<div class="sixteen columns item"></div>
<div class="sixteen columns item"></div>
<div class="sixteen columns item"></div>
<div class="sixteen columns item"></div>
<div class="sixteen columns item"></div>
<div class="sixteen columns item thing entry" id="example-basic"></div>
</section>
If i place this part on top of the others it seems to be working and the alert is displayed
<div class="sixteen columns item thing entry" id="example-basic"></div>
Javascript
<script>
$('.entry').waypoint(function() {
alert('The element appeared on the screen.');
});
</script>