我在Firefox/Firebug中得到以下错误,但在Safari中没有。
代码:$("输入[name = '还有']:检查")。Val不是函数
$(document).ready(function(){
$("#message-form").change(function(){
var selectedRadio = $("input[name='how_many']:checked").val();
if(selectedRadio == "some")
{
$("#conditional").fadeIn("slow");
}else{
$("#conditional").fadeOut("slow");
};
});
});
不知道为什么这个固定,但我把我的脚本移到前面的底部,现在它在Firefox, Chrome和Safari中工作