bootstrap 3没有在jQuery selec2上显示工具提示

Eri*_*oni 0 html javascript css jquery twitter-bootstrap-3

我使用select2插件设计我的选择框.现在,我需要在selectbox上显示工具提示.

HTML:

<select class="selectD input-sm" name="newsoptions_amount" data-toggle="tooltip" data-placement="bottom" title="Gallery Cover">
    <option>1</option>
    <option>2</option>
    <option>3</option>
</select>
    <br><br><br>

    <a class="width24 thumbcheck" data-toggle="tooltip" data-placement="bottom" title="Gallery Cover" data-id="">test tooltip</a> 
Run Code Online (Sandbox Code Playgroud)

JS:

$(document).ready(function () {
    $(".selectD").select2({
        allowClear: true
    });
});
$("[data-toggle='tooltip']").tooltip();

/*     
 * Add collapse and remove events to boxes
 */
$("[data-widget='collapse']").click(function () {
    //Find the box parent        
    var box = $(this).parents(".box").first();
    //Find the body and the footer
    var bf = box.find(".box-body, .box-footer");
    if (!box.hasClass("collapsed-box")) {
        box.addClass("collapsed-box");
        bf.slideUp();
    } else {
        box.removeClass("collapsed-box");
        bf.slideDown();
    }
});
Run Code Online (Sandbox Code Playgroud)

我添加data-toggle="tooltip" data-placement="bottom" title="Gallery Cover"了selectbox但没有显示工具提示!

如何在选择框上显示工具提示顶部?!

DEMO 在这里

ಠ_ಠ*_*ಠ_ಠ 6

只需替换:

$("[data-toggle='tooltip']").tooltip();

$(".selectD").tooltip();

演示