IE中的jQuery切换类问题
以下jQuery代码在FireFox中运行良好,但在IE中不起作用 循环执行预期次数(通过计数警报进行验证),但隐藏类不可见IE中的jQuery切换类问题,jquery,Jquery,以下jQuery代码在FireFox中运行良好,但在IE中不起作用 循环执行预期次数(通过计数警报进行验证),但隐藏类不可见 $("a.riskInformationButton").bind("click", function(e){ var toggler = $(this).parent().parent().next(); while(!toggler.hasClass("spacerRow")){ alert("Hey!"
$("a.riskInformationButton").bind("click", function(e){
var toggler = $(this).parent().parent().next();
while(!toggler.hasClass("spacerRow")){
alert("Hey!");
toggler = toggler.toggleClass("hidden").toggleClass("visible").next();
}
});
在此问题上的任何协助都将不胜感激
谢谢
Shawn它们是表格行吗?jQuery有一个。这里有一个。你能解释一下你在这行中想做什么吗?`toggler=toggler.toggleClass(“隐藏”).toggleClass(“可见”).next()?要在显示和隐藏之间切换,不需要使用toggleClass。使用toggle()-您应该改进您的另一个问题。不要再问同样的问题了。