我正在修改jquery clockpick插件供我自己使用。但我遇到了错误。每次加载followng脚本时,我的浏览器崩溃
当if条件为真时。 特别是当我在内部给出varable m时,如果循环一些值。
我做错了什么?下面是代码..谢谢你的帮助
for (var m = 0; m < 60; m = m + n) {
/*if this condition is true my browser crashes else it runs smoothly*/
if (settings.absolutestarthour != null && realhours <= settings.absolutestarthour.split(':')[0]) {
excludeuntilhour = settings.absolutestarthour;
excludeuntilhour = excludeuntilhour.split(":");
m = n * ((Math.floor(parseInt(excludeuntilhour[1]) / n)) + 1);
/*h=parseInt(excludeuntilhour[0]);*/
console.log('no error');
}
$md = jQuery("<div class='CP_minute' id='" + realhours + "_" + m + "'>" + displayhours + ":" + ((m < 10) ? "0" : "") +
m + tt + "</div>");
if (!v) {
$md.css("float", "left");
if (settings.minutedivisions > 6 && counter == settings.minutedivisions / 2 + 1) {
// long horizontal, kick in extra row after half
$mc.append("<div style='clear:left' />");
}
}
$mc.append($md);
binder($md);
counter++;
}