Performant Javascript

I’m writing a map editor in Javascript and XHTML at the moment. It’s based on a table, 100 x 100 cells and I’m executing code and adding listeners to each cell. I’ve been using JQuery which sometimes works really well and sometimes borks with a dead page message.

Selectors are fine, hover works just great. hide(0) dies but css(“display”,“none”) works quickly. Surprisingly toggle completely fails.

I was wondering if anyone has any experience with using Javascript like this and has any thoughts or tips. I’m not wedded to jquery and it would be nice to do some animation.

Rather than managing 10000 sets of handlers, I’d handle all the events from the table,
and determine the target cell from there.

Awesome, that’s exactly the kind of thinking I like :slight_smile:

I was considering placing an absolutely positioned transparent div over the whole table and detecting clicks from that, using the mouse coords to set the hidden checkboxes. The advantage of that is that I could also use it to simulate environmental effects (fog, rain, etc) using semi-transparent pngs.