0
ウィンドウのサイズを変更するまでウェイポイントプラグインが正しく動作しません。私は理由を知りませんし、この問題の理由を見つけることができません。 ウィンドウのサイズ変更後、すべてが正しくなりました。ここでウィンドウのサイズが変更されるまでウェイポイントが正しく動作しない
は、私のコードの一部です:ここ
$(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/