destroying or disabling already initialized keytable plugin.

destroying or disabling already initialized keytable plugin.

azhararmarazhararmar Posts: 6Questions: 0Answers: 0
edited May 2012 in KeyTable
i am using keytable plugin with jeditable and here is the code.

var keys = new KeyTable({
"table": document.getElementById('estEditTable'),
"datatable": estEditTable
keys.event.action( null, null, function (nCell) {
keys.block = true;
$(nCell).editable( function (sVal) {
var id = $(this).parent().attr('id');
var index = $(this).parent().find('td.focus').index();
console.log(id + ', ' + index + ', ' + sVal);
keys.block = false;
return sVal;
"onblur": 'submit',
"onreset": function()
setTimeout( function () {keys.block = false;}, 0);
setTimeout( function () { $(nCell).click(); }, 0 );

on wake of click even i want to disable or destroy the keytable plugin. something like this.

//disable key table plugin

and also similarly enable it.

is there a way i could do this?

thank you.


  • allanallan Posts: 55,882Questions: 1Answers: 8,835 Site admin
    KeyTable has a 'block' parameter which and be used to tell it to ignore key strokes - keys.block = true; for example. Then to enable input control again you'd just set it to false (you might need to set focus as well depending if focus is retained or not).

This discussion has been closed.