php - X-可编辑从其他元素触发

标签 php jquery ajax

这是我的问题

我正在开发 x-editable,我实现了它并且它正在工作。

但现在我需要通过单击外部元素来激活可编辑

我有这样的解决方案

$(document).ready(function() {
    $("a.clickme").click(function(){
        $('.edit').editable('http://www.example.com/save.php');
    });
});

Jeditable - 通过单击 Y 激活 X 的编辑(引用上述代码)

但它仅激活输入框未显示的部分。

任何帮助将不胜感激。

最佳答案

这是一个很好的示例:http://jsfiddle.net/xBB5x/348/

$('#users').on('点击', '.edit', function(){ $('#users').find('.editable-open').editable('隐藏'); $('#users').find('.btn-primary').hide(); $('#users').find('.edit').show(); $(this).hide().siblings('.btn-primary').show(); $(this).closest('tr').find('.editable').editable('show'); });

发现于https://github.com/vitalets/x-editable/issues/80

关于php - X-可编辑从其他元素触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19287887/

相关文章:

PHP : Post get method, 需要一些建议

javascript - 将 MySQL 的两行放入 PHP 数组中

javascript - 如何在jointjs中创建保存工作区功能?

jquery - :remote => true Ajax call in Rails not working

javascript - 使用 jQuery 添加点击数字

javascript - 文档头部的 JQuery 和脚本

php - 如何将api结果添加到mysql

php - CodeIgniter 全局变量

javascript - 投票箭头,如带有 Bootstrap 的堆栈溢出,如何减小字形图标元素的大小并使它们更紧密

java - 大型java项目解决方案