-2

我正在尝试使它在我在 android 上时隐藏或不显示 div。

我在这里使用代码http://jsfiddle.net/Gajotres/xHA46/

$(document).on('pageshow', '#index', function(){       
var agent = navigator.userAgent;      
var isAndroid = (agent.indexOf("Android")  > 0);     

if (isAndroid ){ 
    $("div.instruction").show();
}    
});

但我不确定如何让它隐藏而不是显示。

我只是把 hide() 而不是 show() ?

4

1 回答 1

2

是的,只需使用.hide().

阅读http://api.jquery.com/hide/了解更多信息。

于 2013-07-13T18:29:40.223 回答