bootstrap插件fileinput.js出现出现$("#xxxx").fileinput({}

如果出现$("#xxxx").fileinput({}); 不生效的情况需将fileinput.js中最后几行注释掉:

/ $(document).ready(function () {
var $input = $(‘input.file[type=file]‘), count = $input.attr(‘type‘) ? $input.length : 0;
if (count > 0) {
$input.fileinput();
}
});
/

    如果是fileinput.min.js,则需要将末尾部分的
    ,e(document).ready(function() { var t = e("input.file[type=file]");
    t.length && t.fileinput() }) 去掉

    或者,不要在 $(document).ready(function () {}) 中调用,
    否则不生效

猜你喜欢

转载自blog.51cto.com/maplebb/2121188