开发者

How do I use the jQuery, Waypoints extension on a Click Event?

I'm reading the documentation here: jQuery, 开发者_如何学编程Waypoints, plugin docs.

And I'd like to refresh the waypoints using this jQuery object extension on a click event:

$.waypoints('refresh')

How do you do that?


Click-event on what?

Suppose you add a button to the page:

<button id="refreshWaypointsBtn" type="button">Refresh the waypoints.</button>

Then you'd activate it like so:

$("#$refreshWaypointsBtn").click ( function () {
    $.waypoints ('refresh');
} );


$('#$refreshWaypointsBtn').on('click', function() {
     Waypoint.refreshAll();
});     
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜