Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
waypoint('sticky')每当更改导航栏的类时,我想切换另一个元素的类。我试图使用该handler选项触发回调,但它不起作用。我能做什么?
waypoint('sticky')
handler
出于某种原因,Waypoints 的回调选项是“处理程序”,因此您可以这样做:
$.waypoint('sticky', { handler: function(dir) { //Do stuff when the user scrolls past this waypoint. } });