【问题标题】:Callback for Cancel event for jQuery jEditablejQuery jEditable 的 Cancel 事件回调
【发布时间】:2013-01-30 13:40:58
【问题描述】:

我使用 Mike Tuupola 的 jQuery jEditable 如下:

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 
}

我需要拦截取消事件 - 最好的方法是什么

【问题讨论】:

    标签: jquery jeditable


    【解决方案1】:

    使用thisthis

    $("#editable_text").editable(submitEdit, { 
        //...
        onreset: jeditableReset,
        //...
    });
    
    function jeditableReset(settings, original) {
       // whatever you need to do here
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-08
      • 2015-08-14
      • 2012-01-12
      相关资源
      最近更新 更多