我写了一个jquery函数,在其中一个td中添加一个带有datepicker的新行。它在chrome和safari中完美运行,但它在firefox中不起作用,我不知道为什么。
Heres a jsfiddle - > http://jsfiddle.net/yFEkW/1/
有人知道修复吗?
答案 0 :(得分:1)
基本上在回调调用上传递参数是不安全的。 尝试这样的事情:
var a = $('<a href="#" class="remove">x</a>');
a.click(function() {
remove_it(idtag);
return false; // use this to not try and navigate to the href
});
$('#rate_exception_table').find('tbody')
.append($("<tr id='" + idtag + "'>")
.append($('<td>').append(""))
.append($('<td>').append(""))
.append($('<td>').append(picker))
.append($('<td>').append(a))
);
答案 1 :(得分:0)
想通了。将“event.timestamp”更改为“new Date()。getTime()”
工作小提琴 - &gt; http://jsfiddle.net/yFEkW/3/