[英]jQuery click event only working in landscape(iPad)
我有一個單擊事件,僅當我將iPad放在橫向時才起作用,但是當我將其變為縱向時,它將停止工作。 誰能告訴我為什么?
<div id="home_page">
<div class="full">
<button class="button" id="func_checks">Functional Checks</button>
</div>
</div>
$(document).ready(function(){
$("#func_checks").on("click touchstart", function(){
$("#header").append("<h1>G-IV Functional Checks</h1>");
$("#home_page").hide();
$(".return").show();
$("#checks_page").show();
})
})
將點擊處理程序修改為:
$("#func_checks").on("click touchstart", function(){
$("#header").append("<h1>G-IV Functional Checks</h1>");
$("#home_page").hide();
$(".return").show();
$("#checks_page").show();
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.