Код: Выделить всё
$("tbody td").click(function (e) {
var id = $(this).closest("tr").data("key");
if(e.target == this)
location.href = "/record/update?id=" + id;
});
Изобрел (изменив первоначальный скрипт) пока-что такой костыль, который помог:
Код: Выделить всё
function f() {
$("tbody td").click(function (e) {
var id = $(this).closest("tr").data("key");
if(e.target == this)
location.href = "/record/update?id=" + id;
});
}
$(document).ready(function() {
f();
});
$(document).on('pjax:complete', function() {
f();
})