How to toggle function with jquery waypoint

Xiaodeguo

New Member
I want to toggle functions using the jquery waypoint fuction, how can I combine these pieces of code to make that happen? (I would be happy with alternative solutions too).I want to combine this.....\[code\]$('#pageborder').waypoint(function(direction) { //do something here}, { offset: 'bottom-in-view' });\[/code\]With this......\[code\].toggle(function(){ $('.play', this).removeClass('pausing'); $('.play', this).addClass('playing');}, function(){ $('.play', this).addClass('pausing'); $('.play', this).removeClass('playing');});\[/code\]The end result should be functions getting toggled when the way point is reached.More info on the JQuery Waypoint plugin here: http://imakewebthings.com/jquery-waypoints/#doc-waypoint
 
Back
Top