I am using Ludo van den Boom's treeTable jquery plugin to represent a table as a expandable tree. Once my data set becomes large both Firefox and IE timeout on executing the call to the plugin in my $(document).ready.
The plugin's public method is:
$.fn.treeTable = function(opts) {
options = $.extend({}, $.fn.treeTable.defaults, opts);
return this.each(function() {
$(this).addClass("treeTable").find("tbody tr").each(function() {
// Initialize root nodes only whenever possible
if (!options.expandable || $(this)[0].className.search("child-of-") == -1) {
initialize($(this));
}
});
});
};
It gets called from:
$(document).ready(function() {
$(".reportTable").treeTable();
});
Where reportTable is the class of a fairly large table. initialize is a recursive call.
Can this be modified to to avoid the timeouts both browsers give? I've seen a reference to using setTimeout ( See question #779379) but I am not sure how to apply that.