这是我的问题
我正在开发 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');
});
关于php - X-可编辑从其他元素触发,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19287887/