0
Waypoints插件不能正常工作,直到我調整窗口的大小。我不知道爲什麼,也找不到這個問題的原因。 窗口調整大小後,所有成爲正確的。航點不能正常工作,直到窗口調整大小
這裏是我的代碼部分:
$(function)(){
//menu active change while scroll
var about_us = $("section.about-us");
waypoints = about_us.waypoint(function(direction){
console.log("about_us section");
changeActiveMenu("about_us-menu");
if (direction === 'down') {
$(".to-top").addClass("show");
console.log("show-to-top");
}else if (direction === 'up') {
$(".to-top").removeClass("show");
console.log("hide-to-top");
}
},{
offset: "30%"
});
var building = $("section.building");
waypoints = building.waypoint(function(){
console.log("building section");
changeActiveMenu("building-menu", "service-menu");
},{
offset: "30%"
});
});
這裏是有問題的鏈接:http://sandbox.maximshadrin.ru/aquanomika/