简体   繁体   English

后退按钮在Ipad的默认浏览器(Safari)上不起作用

[英]Back button not working on Ipad's default browser(Safari)

Let me tell you the scenario of my problem. 让我告诉你我的问题的情况。 In my application i am having 100 item to show to user but for the first time only 15 item will be showed as user will scroll down spinning icon will blink for a moment and more item will be showed to him/her(15,30,45 till the last item). 在我的应用程序中,我有100个项目要显示给用户,但是第一次显示15个项目,因为用户将向下滚动旋转图标会闪烁一会儿,还有更多项目将显示给他/她(15,30 45至最后一项)。 when user clicks on any item,details of that item will be showed. 当用户单击任何项​​目时,将显示该项目的详细信息。 on the details page there is one back button which will take user to items page. 在详细信息页面上,有一个后退按钮,可将用户带到项目页面。 so on click of back button again on scrolling more items will get showed. 因此,再次单击后退按钮可滚动显示更多项目。 Please have a look on the code for scrolling and back button. 请查看滚动和后退按钮的代码。

Now this code is working fine for all the browsers only it is not working on Ipad's default browser(Safari). 现在,此代码仅对Ipad的默认浏览器(Safari)不起作用,因此对所有浏览器都可以正常工作。

Even it is working on desktop safari version with same user-agent. 即使是在具有相同用户代理的桌面野生动物园版本上也可以使用。

Scroll logic : 滚动逻辑:

$(window).scroll( function() 
{
 reloadq() //function to display more items
}

Back button coding : 后退按钮编码:

href="javascript:history.go(-1)" class="back-btn">Back

不知道它是否可以工作(我没有要测试的iPad),但是您可以尝试使用href="javascript:window.history.back()"代替。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM