无法在<select>标签</select>上添加bootstrap工具提示

时间:2014-05-13 06:34:10

标签: jquery twitter-bootstrap select jquery-tooltip

我想在我的选择框中添加一个底部工具提示,但无法这样做。在悬停时没有显示任何内容。

以下是我的选择框代码:

<select class="navbar-search pull-left span1" name="currency" id="select-currency" data-original-title="Tooltip on bottom" data-toggle="tooltip" data-placement="bottom">
    <?php foreach ($this->getCurrencies() as $_code => $_name): ?>
        <option value="<?php echo $this->getSwitchCurrencyUrl($_code) ?>"<?php if($_code==$this->getCurrentCurrencyCode()): ?> selected="selected"<?php endif; ?>>
            <?php echo $_code ?>
        </option>
    <?php endforeach; ?>
    </select>

这是我的工具提示jquery:

<script>
     jQuery(function(){
        $("[data-toggle=tooltip]").tooltip();
    });
​</script>

1 个答案:

答案 0 :(得分:0)

对我来说很好,请看一下:bootstrap tooltip on tag