. : , Prototype update DOM, .
, , :
:
100%, , , , Prototype , , Prototype . , , table.tbodies[0] is undefined, , .
, : . script , jQuery('table').trigger(...). - , tablesorter. trigger, ( ).
: , jQuery('table').trigger('update'). , . , ; , .
? , trigger: , , "" DOM, , . , 'click', "domelement.click(event) to call any old-style DOM0 handlers on the element. Similarly if you trigger an 'update' event, eventually it will call 'domelement.update(event), DOM .
, Prototype : Prototype update DOM. jQuery html: , . , tbody. jQuery Prototype update , .
, Prototype, :
jQuery(function($) {
var p = document.createElement('p');
p.innerHTML = "Hi there";
p.update = function() {
display("<code>update</code> called on paragraph");
};
document.body.appendChild(p);
$("#theButton").click(function() {
$("p").trigger("update");
});
function display(msg) {
$("<p>").html(String(msg)).appendTo(document.body);
}
});
|
, , , , update .
jQuery('table').trigger('update'). tablesorter, , "update", ( ). , tablesorter Prototype, , , , , "" (, "tableupdate" ).