JQuery JEditable - How to Disable on click editing

前端 未结 2 959
没有蜡笔的小新
没有蜡笔的小新 2020-12-30 11:40

I was wondering if you can stop text being editable on click? I have a separate edit button to make the text editable and that\'s the only way that I want the user to be ab

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-30 12:24

    Britt is right, add a custom event, and trigger it with a button for example. Here is some code to explain it:

    The custom event:

    $('#id').editable('http://www.example.com/save.php', {
        event : 'custom_event'
    });
    

    And the trigger:

    
    

提交回复
热议问题