我想使用 bootstraps X-editable 插件。我在表中检索服务器端数据,并且想在线编辑它们。正如我所看到的,X-editable 建议与 id 一起使用。可以用多个数据来处理这个问题吗?
文档:
<a href="#" id="username" data-type="text" data-pk="1" data-url="/post" data-title="Enter username">superuser</a>
$(document).ready(function() {
$('#username').editable();
});
如果我有更多用户名怎么办?
最佳答案
<a href="#" id="username" data-type="text" data-pk="1" data-url="/post" data-title="Enter username">superuser</a>
更改为
<a href="#" class="username">superuser</a>
和
$(document).ready(function() {
$('#username').editable();
});
更改为
$(document).ready(function() {
$('.username').editable();
});
关于jquery - 如何在表行中使用 bootstraps x-editable?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19568845/