简体   繁体   English

更改 <ul><li> 至 <div> 在fineuploader中

[英]Changing <ul><li> to <div> in fineuploader

I am using http://fineuploader.com/ and Twitter bootstrap 我正在使用http://fineuploader.com/和Twitter引导程序

The html code for the uploading files looks like this 用于上传文件的html代码如下所示

    <ul class="qq-upload-list-selector">
     <li class="col-lg-3 col-md-4 col-xs-6 thumb">
            <div class="qq-progress-bar-container-selector">
                <div class="qq-progress-bar-selector qq-progress-bar"></div>
            </div>
            <span class="qq-upload-spinner-selector qq-upload-spinner"></span>
            <img class="qq-thumbnail-selector" qq-max-size="100" qq-server-scale>
            <span class="qq-edit-filename-icon-selector qq-edit-filename-icon"></span>
            <span class="qq-upload-file-selector qq-upload-file"></span>
            <input class="qq-edit-filename-selector qq-edit-filename" tabindex="0" type="text">
            <span class="qq-upload-size-selector qq-upload-size"></span>
            <a class="qq-upload-cancel-selector btn-small btn-warning" href="#">Cancel</a>
            <a class="qq-upload-retry-selector btn-small btn-info" href="#">Retry</a>
            <a class="qq-upload-delete-selector btn-small btn-warning" href="#">Delete</a>
            <a class="qq-upload-pause-selector btn-small btn-info" href="#">Pause</a>
            <a class="qq-upload-continue-selector btn-small btn-info" href="#">Continue</a>
            <span class="qq-upload-status-text-selector qq-upload-status-text"></span>
            <a class="view-btn btn-small btn-info hide" target="_blank">View</a>
</li>
    </ul>

I want to change the <ul></ul><li></li> tags to <div> because I want the result to appear in a bootstrap grid. 我想将<ul></ul><li></li>标记更改为<div>因为我希望结果显示在引导网格中。 When I change the code can't I get any upload result for my uploaded files. 更改代码后,上传的文件无法获得任何上传结果。 Looks like new li-tags generates by fineuploader javascript. 看起来像是由fineuploader javascript生成的新li标签。

How do I use div instead and so that I can display the result in a bootstrap grid? 如何改为使用div,以便可以在引导网格中显示结果?

Tested this 测试了这个

<div class="qq-upload-list-selector col-lg-3 col-md-4 col-xs-6">
     <div class="qq-progress-bar-container-selector">
                    <div class="qq-progress-bar-selector qq-progress-bar"></div>
                </div>
Rest of the code ....
</div>

Fine Uploader is expecting a container inside of the qq-upload-list-selector to to hold the file item. Fine Uploader希望在qq-upload-list-selector内部的容器中保存文件项。 Consider adding another <div> as the only child of the qq-upload-list-selector. 考虑添加另一个<div>作为qq-upload-list-selector的唯一子级。

So... 所以...

<div class="qq-upload-list-selector col-lg-3 col-md-4 col-xs-6">
    <div>
        <div class="qq-progress-bar-container-selector">
            <div class="qq-progress-bar-selector qq-progress-bar"></div>
        </div>
Rest of the code ....
    </div>
</div>

Why do you need a <div> for this? 为什么需要一个<div> There's nothing special about a <div> . <div>没什么特别的。 Just modify the style of the list item/list appropriately. 只需适当地修改列表项/列表的样式即可。 Fine Uploader doesn't insert <li> tags if they aren't in your template. 如果上载模板中没有<li>标记,则Fine Uploader不会插入。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM