Bootstrap Popover/Clickover

Dev*_*ian 2 javascript popover jsfiddle twitter-bootstrap

所以我想知道......我正在使用Twitter的Bootstrap进行我的项目,我发了一个小通知Popover/Clickover(http://www.leecarmichael.com/bootstrapx-clickover/examples.html)功能.而且我想知道如何在静态高度上设置自定义滚动条...

我创建此弹出/点击的基本概念是:

$(function () {
    $("[rel='tooltip']").tooltip({container: 'body'});
});
$("#notices").clickover({
    content:data,
    html:true,
    container:'body'
    ,onShown: function () {$("#notices").tooltip("destroy");},
    onHidden: function () {$("#notices").tooltip({container:'.navbar'});},
    template: '\
        <div class="popover notices">\
            <div class="arrow"></div>\
            <div class="popover-inner">\
                <div class="popover-header">\
                    <h3 class="popover-title"></h3>\
                    <h3 class="popover-settings"><a href="/notifications.php?act=settings">Settings</a></h3>\
                </div>\
                <div class="popover-content">\
                    <p></p>\
                </div>\
                <h3 class="popover-footer"><center><a href="/notifications.php">See All</a></center></h3>\
            </div>\
        </div>'

});
Run Code Online (Sandbox Code Playgroud)

使用HTML

<div id='userbar' class='btn-group input-prepend input-append'>
    <button class='btn'></button>
    <button class='btn'></button>
    <button class='btn'></button>
    <button class='btn'></button>
    <button class='btn'></button>
    <button class='btn'></button>
    <button class='btn'></button>
    <button id='notices' class='btn' rel='tooltip' data-placement='bottom' data-original-title='Notifications'> <i class='icon-exclamation-sign icon-large'> <span class='badge badge-important'>102</span></i></button>
</div>
Run Code Online (Sandbox Code Playgroud)

所以我在JSFiddle上发了一篇关于这个的帖子.我没有包含bootstrap网站的bootstrap指令,但我已经在Javascript部分发布了代码,因为工具提示有点修改.所以可能是很多代码行,虽然我的主要代码是最后的...

链接是:http://jsfiddle.net/6GRHa/3/

带有Popover的按钮是"感叹号"

就像我说我想申请一个自定义的高度和一个可滚动的酒吧在那里更多的内容...提前谢谢你...

jko*_*era 7

.popover-content {
    max-height: 300px;
    overflow-y: auto;
}
Run Code Online (Sandbox Code Playgroud)