2014-09-29 39 views
0

HTML:jQuery Mobile的:如何防止頁眉/頁腳顯示當點擊某一元素

<div data-role="page"> 
<div data-role="header" data-position="fixed" data-fullscreen="true" > 
<div data-role="content" class="ui-content" id=""#article-page"> 
... 

我想阻止頁眉/頁腳顯示當向左掃/右或單擊內容某個元素; 否則,讓頁眉/頁腳顯示。

我試着preventDefault,不工作。

$("#article-page").bind("swipeleft", function(evt){ 
    evt.preventDefault(); 
    navidown(); 
}); 

回答

0

測試這個。

<div data-role="header" data-position="fixed" data-fullscreen="true" 
    data-tap-toggle="false"> 

添加了數據切換切換。

$("div[data-role=header]").toolbar("hide"); 

API

+0

它翻轉顯示/隱藏,不好呢。 – whi 2014-09-29 04:59:55

相關問題