jQuery UI show/hide를 사용하여 반응 형 레이아웃에서 내 웹 사이트 메뉴를 표시하거나 숨기고 몇 달 동안 그렇게했습니다. iOS 8의 Safari (및 후속 업데이트)가 정확하게 올바르게 작동하지 않는 것을보고 있습니다. 표시/숨기기가 정상적으로 작동하지만 스크롤 할 때마다 메뉴가 자동으로 숨겨집니다. 어떤 제안?스크롤 할 때 iOS 8이 jQuery UI를 표시/숨기기
OK, 여기에 코드입니다 :
$(document).ready(function() {
function checkWidth() {
var windowsize = $(window).width();
if (windowsize < 950) {
$('#LeftNavigationContent').hide();
$('#LeftNavigationContent').attr('class', 'LeftNavigationResponsive');
$('#LeftNavigationControllerImage').html('Section Menu <div class="Rotate90Clockwise">»</div>');
$('#LeftNavigationControllerImage').attr('title', 'Show Section Menu');
}
else {
$('#LeftNavigationContent').show();
$('#LeftNavigationContent').attr('class', 'LeftNavigationNormal');
$('#LeftNavigationControllerImage').html('Section Menu <div class="Rotate90Clockwise">«</div>');
$('#LeftNavigationControllerImage').attr('title', 'Hide Section Menu');
}
}
checkWidth();
$(window).resize(checkWidth);
$('.LeftNavigationController').click(function() {
$('#LeftNavigationContent').toggle('500');
if ($('#LeftNavigationControllerImage').html() == 'Section Menu <div class="Rotate90Clockwise">«</div>') {
$('#LeftNavigationControllerImage').html('Section Menu <div class="Rotate90Clockwise">»</div>');
$('#LeftNavigationControllerImage').attr('title', 'Show Section Menu');
} else {
$('#LeftNavigationControllerImage').html('Section Menu <div class="Rotate90Clockwise">«</div>');
$('#LeftNavigationControllerImage').attr('title', 'Hide Section Menu');
}
});
});
내가 정의한 스크롤 기능이 없기 때문에 모든 브라우저에서 표시/숨기기가 올바르게 작동합니다. 문제는 #LeftNavigationContent가 iOS 8 Safari의 스크롤에 자동으로 숨겨져 있다는 것입니다.
재현 가능 격리 된 코드를 게시하십시오. – Christina