2014-05-09 48 views
0
$(document).on('touchstart click', function(){ 
     $('#box').hide(); 
}); 

if(isset($_GET['s'])){include(//another page);} 

另一個頁面將禁用文件點擊$('#box').hide();jQuery的禁用先前的功能

我有一個頁面,如果得到變量isset,這將包括另一頁。

不過,我需要禁用文件點擊隱藏DIV功能

任何人知道如何實現這一目標?

回答

2

如果我理解正確的話您的問題,這可能工作:

myvar = 0; 

$(document).on('touchstart click', function(){ 
     if(myvar==0){ 
      $('#box').hide(); 
     } 
}); 

if(isset($_GET['s'])){ 
    include(//another page); 
    myvar = 1; 
} 
+0

可能無法觸及以前的代碼,並禁止從另一個網頁? – Ben

+0

林不知道這是完全相關的,但看看:http://stackoverflow.com/questions/22400907/how-to-remove-document-on-click-event – Nezure