Reputation: 141
I'm using waypoints.js in a project to fire an event whenever a list element becomes visible. The only problem is, nothing seems to be happening - the waypoint.reached event does not seem to be firing.
The file (waypoints.js) is being included correctly, as is jQuery, in the correct order.
You can view the (work in progress) page here.
Upvotes: 1
Views: 4512
Reputation: 29304
You're trying to attach the waypoint functionality to an element that doesn't exist yet. Put $(document).ready(function() { //your code here });
around your code and it will work.
Also, you should add the type="javascript"
attribute to your script tags - it's not optional as far as I can remember.
Upvotes: 2