Bootstrap Popover / Clickover

So i was wondering... I'm using Twitter's Bootstrap for my Project and i made a small notification Popover / Clickover (http://www.leecarmichael.com/bootstrapx-clickover/examples.html) feature. And i was wondering how i can manage to make it on a static height with a custom scroll bar in it...

My basic Concept of creating this popover/clickover is:

$(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>'

});

With 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>

So i made a post on JSFiddle about that. I have not included bootstrap directives from bootstrap's site but i have posted the code in the Javascript Section because tooltips are a bit modified. So may be a lot of code lines, though my main code is at the end...

The link is: http://jsfiddle.net/6GRHa/3/

The button with the Popover is the "Exclamation mark"

And like i said i want to Apply to it a custom height and a scrollable bar to be there for more content... Thank you in advance...

Answers


.popover-content {
    max-height: 300px;
    overflow-y: auto;
}

just add some css to give the popover a fixed height and scrollbars:

.popover-inner {
   height: 250px;
   overflow:scroll;
}

The fiddle is here: http://jsfiddle.net/6GRHa/4/


Need Your Help

Building an index of URLs , what features to include?

data-analysis text-mining

I am working towards building an index of URLs. The objective is to build and store a data structure which will have key as a domain URL (eg. www.nytimes.com) and the value will be a set of features

Simple WPF page selection for multipaged tiff

wpf wpf-controls image-manipulation tiff

I am making a basic Tiff viewer and need to be able to select the page to be viewed. In Winforms I could use selectActiveFrame, so I was wondering if there is a WPF equivalent for this. Thanks!

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.