I tried to manually trigger the color change through the jQuery trigger() method, but it didn't work. I found the issue was at the very end of the colorize module, I replaced
this.onclick = function() { if(checkBan.call(this)) return; handler.clickFunc.call(this, cells); }
with
$(this).bind("click", function() { if(checkBan.call(this)) return; handler.clickFunc.call(this, cells); });
By using bind() rather than attaching directly to the onclick event, I could then use trigger() on the td object and make the cell colorize.
More information about formatting options
Manually triggering the color change from code
I tried to manually trigger the color change through the jQuery trigger() method, but it didn't work. I found the issue was at the very end of the colorize module, I replaced
this.onclick = function() {
if(checkBan.call(this)) return;
handler.clickFunc.call(this, cells);
}
with
$(this).bind("click", function() {
if(checkBan.call(this)) return;
handler.clickFunc.call(this, cells);
});
By using bind() rather than attaching directly to the onclick event, I could then use trigger() on the td object and make the cell colorize.