0
윈도우 크기를 조정하기 전까지 웨이 포인트 플러그인이 올바르게 작동하지 않습니다. 나는 왜 그런지 모르며이 문제의 이유를 찾을 수 없다. 창 크기가 조정 된 후 모두 올바르게되었습니다. http://sandbox.maximshadrin.ru/aquanomika/창이 리사이즈 될 때까지 웨이 포인트가 올바르게 작동하지 않습니다.
윈도우 크기를 조정하기 전까지 웨이 포인트 플러그인이 올바르게 작동하지 않습니다. 나는 왜 그런지 모르며이 문제의 이유를 찾을 수 없다. 창 크기가 조정 된 후 모두 올바르게되었습니다. http://sandbox.maximshadrin.ru/aquanomika/창이 리사이즈 될 때까지 웨이 포인트가 올바르게 작동하지 않습니다.
내가 해결책을 발견 :
여기$(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%"
});
});
이 문제가있는 링크입니다 : 여기
내 코드의 일부입니다. 문제는 코드 순서대로 발생했습니다. 웨이 포인트를 초기화 한 후에 슬라이더를 초기화했는데 height에 모든 슬라이드가 포함되어 있기 때문에 ($ html) .height() 매개 변수가 잘못되었습니다. 그래서 결론을 내 렸습니다. "코드 하단 부분에 항상 초기화 웨이 포인트"