iOS 8在滚动时中断jQuery UI显示/隐藏

iOS 8在滚动时中断jQuery UI显示/隐藏,jquery,ios,Jquery,Ios,我使用jQueryUIShow/hide在我的响应布局上显示和隐藏我的网站菜单,并且已经这样做了几个月。我发现iOS 8上的Safari(以及随后的更新)并没有完全正常工作。显示/隐藏工作正常,但每当我滚动时,菜单都会自动隐藏。有什么建议吗 好的,下面是代码: $(document).ready(function () { function checkWidth() { var windowsize = $(window).width(); if (windowsize <

我使用jQueryUIShow/hide在我的响应布局上显示和隐藏我的网站菜单,并且已经这样做了几个月。我发现iOS 8上的Safari(以及随后的更新)并没有完全正常工作。显示/隐藏工作正常,但每当我滚动时,菜单都会自动隐藏。有什么建议吗

好的,下面是代码:

$(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');
    }
});
$(文档).ready(函数(){
函数checkWidth(){
var windowsize=$(window.width();
如果(窗口大小<950){
$('#LeftNavigationContent').hide();
$('#LeftNavigationContent').attr('class','LeftNavigationResponsive');
$('#LeftNavigationControllerImage').html('Section Menu»');
$('LeftNavigationControllerImage').attr('title','Show Section Menu');
}
否则{
$('#LeftNavigationContent').show();
$('#LeftNavigationContent').attr('class','LeftNavigationNormal');
$('#LeftNavigationControllerImage').html('Section Menu«');
$('LeftNavigationControllerImage').attr('title','Hide Section Menu');
}
}
检查宽度();
$(窗口)。调整大小(选中宽度);
$('.LeftNavigationController')。单击(函数(){
$('#LeftNavigationContent')。切换('500');
如果($('#LeftNavigationControllerImage').html()=='节菜单«'){
$('#LeftNavigationControllerImage').html('Section Menu»');
$('LeftNavigationControllerImage').attr('title','Show Section Menu');
}否则{
$('#LeftNavigationControllerImage').html('Section Menu«');
$('LeftNavigationControllerImage').attr('title','Hide Section Menu');
}
});
}))


我没有定义滚动功能,正如我所说的,显示/隐藏在所有浏览器上都可以正常工作。问题是#LeftNavigationContent在iOS 8 Safari上自动隐藏在scroll上。

您需要添加更多详细信息。你的问题毫无意义。你说你的问题是它工作得很好,只是没有达到你预期的效果

当没有足够的细节时,不能提出任何建议

听起来像是在激活hide()的滚动函数中出现了错误

你的档案里还有其他人吗?有什么变化吗

在你添加细节之前,我的建议是更改一些内容,然后再次检查它是否有效。冲洗并重复


祝你好运。

发布可复制的隔离代码。