KeyTable event cache vs jQuery bind & trigger

KeyTable event cache vs jQuery bind & trigger

keturnketurn Posts: 18Questions: 0Answers: 0
edited August 2010 in KeyTable
I was a little surprised to see KeyTable has some alternative event binding scheme; I'd hoped to change some lines that look like

[code]$('td.name').live('click', fnFoo)[/code]

to

[code]$('td.name').live('click action', fnFoo)[/code]

and be on my merry way. And I see that I *could* add a keytable event handler with something like

[code]
keys.event.action(null, null, function (nCell) {
$(nCell).trigger('action');
}
[/code]

to get that behaviour, but I was wondering why you had the plugin keep its own event cache instead.

I guess if you did want to address cells by row/column index, you probably can't do that very easily with the core jQuery selectors.

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Hi keturn,

    To be perfectly honest, the main reason that it is not done that way is that I didn't know about custom events in jQuery :-). I'd fully agree that this is something that should be looked at for the next major revision of KeyTable! Thanks for bringing it up!

    Regards,
    Allan
This discussion has been closed.