我正在使用两组在初始浏览器大小上能够触发的航路点-但是,当您调整浏览器的大小时,它们会被甩开,看起来很糟糕。
我已经尝试过从Waypoints网站使用refreshAll函数,但似乎无法正常工作。
我的航路点是:
var $sneakyellow = $('.yellow-line-trick-bottom');
$sneakyellow.waypoint(function (direction) {
if (direction == 'down') {
$sneakyellow.addClass('hide-bottom');
} else {
$sneakyellow.removeClass('hide-bottom');
}
}, { offset:'bottom-in-view'});
var $sneakyellowtop = $('.yellow-line-trick-top');
$sneakyellowtop.waypoint(function (direction) {
if (direction == 'down') {
$sneakyellowtop.addClass('fixed-yellow');
} else {
$sneakyellowtop.removeClass('fixed-yellow');
}
});
应用refreshAll的最佳位置和方法在哪里?