我有两个选择输入设置为显示:无。基于change()
在另一个元素中我使用jQuery到show()
或hide()
他们。我的所有浏览器测试看起来都很棒,除了那些因“出错了......”消息而死的Chrome。这里是我的功能显示和隐藏选择元素杀死Chrome
$(document).ready(function(){
$("#supplier_type").change(function() {
if ($("#supplier_type").val() == 'Wholesaler') {
$("#retail_fulfillment").hide("slow");
$("#retail_fulfillment").val("");
$("#wholesale_fulfillment").show("slow");
} else {
if ($("#supplier_type").val() == 'Retailer') {
$("#wholesale_fulfillment").hide("slow");
$("#wholesale_fulfillment").val("");
$("#retail_fulfillment").show("slow");
}
}
});
任何人对此有什么建议?
你有没有试过把它叫做不带参数的'hide()'方法? – naivists 2009-12-30 15:13:44
感谢naivists!事实证明,如果我消除show()和hide()的参数,则错误消除。 – jerrygarciuh 2009-12-30 16:02:15