我们如何在bootstrap中添加popover的数据内容字段中的下拉列表?

时间:2014-06-30 12:00:55

标签: twitter-bootstrap

 <li><a href="#"  data-toggle="popover" title=""data-placement="bottom" data-content="content" role="button" data-trigger="hover" data-original-title="A Title"><b>welcome user</b> <i class="glyphicon glyphicon-user"></i></a></li>

我们如何在数据内容字段中添加html列表而不是纯文本default popover

1 个答案:

答案 0 :(得分:1)

阅读Bootstrap的Popover的Options

HTML

<a href="#" id="example" class="btn btn-primary" rel="popover">popover
</a>

JAVASCRIPT

$(function () {
    $('#example').popover({
        title: "This is a default title",
        html : true,
        content : "<ul><li>test 1</li><li>test 2</li></ul>" 
    });
});

enter image description here