相关疑难解决方法(0)

jQuery` .is(":visible")`不在Chrome中工作

if ($("#makespan").is(":visible") == true) { 
    var make = $("#make").val(); 
}
else {
    var make = $("#othermake").val(); 
}

Make:<span id=makespan><select id=make></select><span id=othermakebutton class=txtbutton>Other?</span></span><span id=othermakespan style="display: none;"><input type=text name=othermake id=othermake>&nbsp;-&nbsp;<span id=othermakecancel class=txtbutton>Cancel</span></span>
Run Code Online (Sandbox Code Playgroud)

上面的代码在Firefox中运行顺畅,但在Chrome中似乎不起作用.在Chrome中它.is(":visible") = false甚至可以显示true.

我正在使用以下jQuery版本:jquery-1.4.3.min.js

jsFiddle链接:http://jsfiddle.net/WJU2r/4/

jquery google-chrome

204
推荐指数
7
解决办法
53万
查看次数

标签 统计

google-chrome ×1

jquery ×1