【问题标题】:Adding a loader image/text in Bootstrap X-editable在 Bootstrap X-editable 中添加加载器图像/文本
【发布时间】:2014-11-16 01:03:36
【问题描述】:

在发出更新请求时,如何将加载器 gif 放入 X-editable 中?

这是我的代码:

$(document).ready(function() {
    $('#username').editable();
});

<a href="#" id="username">superuser</a>

$('#username').editable({
    type: 'text',
    pk: 1,
    url: '/post',
    title: 'Enter username'
});

【问题讨论】:

    标签: jquery html ajax twitter-bootstrap x-editable


    【解决方案1】:

    X-editable 默认带有加载器 gif。

    只要确保加载器 gif 是以下路径:

    /img/loading.gif
    

    如果您希望为 loader.gif 提供自定义路径,

    修改editable-form.css文件line 42中的以下几行:

    .editableform-loading {  
        background: url('../img/loading.gif') center center no-repeat;  
        ...
    

    【讨论】:

    • 感谢神秘人!这对我有用。修改css文件并使用自定义路径。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-09-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多