I'm calling the below 2 function once per Cell in a table with over 135 columns and over 200 rows (that is 134*200 = 26800 times, I'm not running the functions on the first column).
I would like to optimize the functions as much as possible. Do you have any suggestions on how to do that, if it even possible?
this.addBodyCellFunction = function(row, index, func, params) {
var cell = $(document.getElementById("table_row_" + row +"_col_" +index));
cell.click(function() {
func.apply(this, params);
});
cell.css("cursor", "pointer");
};
this.addBodyCellTooltip = function(row, index, text) {
var cell = $(document.getElementById("table_row_" + row +"_col_" +index));
cell.attr("title", text);
};
cell.css. \$\endgroup\$.rowscollection on thetableand thecellscollection on therow... like:document.getElemntById("my_table").rows[1].cells[3]\$\endgroup\$cell.setAttribute("title", text). \$\endgroup\$