Search code examples
javascriptjqueryhtmlcssjquery-waypoints

Issue with query waypoints plugin basic example


for some reason I can't get the basic example from waypoints plugin working. Any idea what is wrong? Here is a jsfiddle http://jsfiddle.net/ZA8bd/2/

CSS

  .block1 {
    margin-top:30px;
   width: 400px;
   background: red;
height: 800px;
}

.block2 {
    margin-top:30px;
   width: 400px;
   background: green;
height: 800px;
}

HTML

    <div class="block1"></div>
<div class="block2"></div>

JS

$('.block2').waypoint(function() {
  notify('100 pixels from the top');
}, { offset: 100 });

Solution

  • Everything looks fine except the javascript is not able to look up for notify() function. Using alert() instead works perfectly fine.