jQuery的jeditable没有确定和取消按钮 [英] jquery jeditable without OK and Cancel Buttons

查看:136
本文介绍了jQuery的jeditable没有确定和取消按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个textarea我能够与jeditable插件来编辑,但我不希望确定和取消按钮。我,而是要通过从文本区域(模糊)马上点击文本保存。我有code准备好了,但我不知道如何使它发挥作用。

I have a textarea that I'm able to edit with the jeditable plugin but I do not want the OK and Cancel buttons. I am, instead, going to save the text by clicking away from the textarea (blur). I have that code ready to go but I do not know how to make it work.

推荐答案

这简单的设置添加到哈希值:

Simply add this to the hash with the settings:

onblur   : 'submit'

例如:

$(document).ready(function() {
    $("#editable1").editable("http://www.domain.com/editdata/", { 
        indicator : "<img src='img/indicator.gif'>",
        type      : 'textarea',
        onblur    : 'submit',
        tooltip   : 'Click to edit...',
        cancel    : 'Cancel'
    });
});

希望它帮助,

干杯

这篇关于jQuery的jeditable没有确定和取消按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆