Pergunta

I an using Mike Tuupola's jQuery jEditable as follows:

function wireupTagCategoryInPlaceEditing() {

    $('.category-label').editable(submitTagCategoryEdit, {
        event: 'tagcategoryedit', // conditionally triggered in wireupTagCategoryClick()
        type: 'text',
        submit: ' Ok ',
        cancel: 'Cancel',
        cssclass: 'tagcategory-inplace-edit'
    });

} 

function submitTagCategoryEdit(value, settings) {
    //handle the edit 
}

I need to intercept the cancel event - what is the best way to do that

Foi útil?

Solução

use this and this

$("#editable_text").editable(submitEdit, { 
    //...
    onreset: jeditableReset,
    //...
});

function jeditableReset(settings, original) {
   // whatever you need to do here
}
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top