[英]Sencha Touch app works well in Android and iOS but Hangs on Windows 8.1
[英]ontouch code on IOS is not the same as on Android touch and windows touch?
我使用此代碼是因為它可以在您滑過div
框時打開div
框和div
框上的陰影。
if (!("ontouch" in document.documentElement)) {
document.documentElement.className += " no-touch";
}
$('html').on('touch touchend', function(e) {
$(this).toggleClass('over');
});
但是我注意到,在三星銀河5上,它的工作不如在iPhone上好。
使用iPhone時,它只能在其上滑動。 但是在Windows觸摸手機上的android上,您實際上必須稍微按一下才能產生相同的效果。 有沒有辦法解決這個問題?
如果您同時擁有兩部手機,都可以在我的網站https://www.gester.nl上對其進行測試。
預先感謝您的回答。
來自荷蘭的問候。
jQuery可以解決大多數此類跨瀏覽器的問題-使用它就可以使用它。此外,您可能是指ontouchstart
而不是ontouch
。
if (!("ontouchstart" in document.documentElement)) {
$(document.documentElement).addClass("no-touch");
}
$('html').on('touch touchend', function(e) {
$(this).toggleClass('over');
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.