jQuery没有';iOS上的t触发器

jQuery没有';iOS上的t触发器,jquery,ios,Jquery,Ios,这是我的css: $(document).ready(function(){ $(window).scroll(function(){ if($(document).scrollTop() > 50) { $( "#hgr_top_navbar_container" ).addClass( "myClass" ); } else{ $

这是我的css:

$(document).ready(function(){
    $(window).scroll(function(){
        if($(document).scrollTop() > 50)
            {

                $( "#hgr_top_navbar_container" ).addClass( "myClass" ); 

            }
        else{
                $( "#hgr_top_navbar_container" ).removeClass( "myClass" );
        }

    });
}); 

我的问题是,这段代码可以在桌面上运行,并且可以在一些Android设备上运行。但它在iOS设备上根本不起作用?有什么可能的解决办法吗

你可能想看看这个答案@Jordy谢谢你的回答,但我发现了我的错误,我在背景色上使用了不透明度:rgb(255255,1),但忘了添加“a”,它应该是rgba(255255,1)。
.myClass {
    position: fixed;
    width: 100%;
    height: 70px;
    background-color: rgb(255,255,255,1) !important;
}