i using waypoint version 3.1.1 jquery version using sticky shortcut call code
$('.navwrap').waypoint('sticky', { direction: 'up', }); but "uncaught error: no handler option passed waypoint constructor" , waypoint not fire.
what doing wrong?
as error suggests, waypoints requires "handler" option, defines callback function when scroll waypoint element:
$('.navwrap').waypoint('sticky', { direction: 'up', handler: function(direction) { alert(direction); } }); you try doing using new no-framework paradigm:
var sticky = new waypoint.sticky({ element: $('.navwrap')[0] }); see docs here:
Comments
Post a Comment