destroying or disabling already initialized keytable plugin.
destroying or disabling already initialized keytable plugin.
azhararmar
Posts: 6Questions: 0Answers: 0
hi,
i am using keytable plugin with jeditable and here is the code.
[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 );
});
[/code]
on wake of click even i want to disable or destroy the keytable plugin. something like this.
[code]
$('#disable').click(function(){
//disable key table plugin
});
[/code]
and also similarly enable it.
is there a way i could do this?
thank you.
i am using keytable plugin with jeditable and here is the code.
[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 );
});
[/code]
on wake of click even i want to disable or destroy the keytable plugin. something like this.
[code]
$('#disable').click(function(){
//disable key table plugin
});
[/code]
and also similarly enable it.
is there a way i could do this?
thank you.
This discussion has been closed.
Replies
Allan