开发者

waypoints.js not working

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) i开发者_如何转开发s being included correctly, as is jQuery, in the correct order.

You can view the (work in progress) page here.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜