Question

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 });
Was it helpful?

Solution 2

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

OTHER TIPS

You just have to define notify variable that will handle message:

http://jsfiddle.net/ZA8bd/3/

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top