だから私は疑問に思っていました...私は自分のプロジェクトにTwitterのBootstrapを使用しており、小さな通知ポップオーバー/クリックオーバー(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>'
});
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>
だから私はそれについてJSFiddleに投稿しました。ブートストラップのサイトからのブートストラップ ディレクティブは含めていませんが、ツールチップが少し変更されているため、Javascript セクションにコードを投稿しました。私のメインコードは最後にありますが、コード行がたくさんあるかもしれません...
リンクは次のとおりです。http://jsfiddle.net/6GRHa/3/
ポップオーバーのあるボタンは「感嘆符」
そして、私が言ったように、カスタムの高さとスクロール可能なバーを適用して、より多くのコンテンツを表示したいと思います...よろしくお願いします...