Twitter ブートストラップ モーダルにコンテンツを読み込んでいますが、問題はコンテンツがかなり長く、サイドバーが必要なことです。このコンテンツは単純な html ページです。モーダル サイドバーを使用する代わりに、iframe を使用します。これは、外部コンテンツを Twitter のブーストラップ モーダルに取り込む唯一の方法です。
<p><a data-toggle="modal" class="updateNotes" href="http://adambalan.com/aisis/aisis_update/UpdateNotes/index.html" data-target="#modal">READ MORE ABOUT IT!</a></p>
<div class="modal hide fade" id="modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Latest Updates!</h3>
</div>
<div class="modal-body">
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
</div>
</div>
jquery:
$('a.btn').on('click', function(e) {
e.preventDefault();
var url = $(this).attr('href');
$(".modal-body").html('<iframe width="100%" height="100%" frameborder="0" scrolling="yes" allowtransparency="true" src="'+url+'"></iframe>');
});
iframe を使用せず、スクロールするコンテンツにモーダル サイドバーを使用する必要があります。何か案が?
また、iframe でスクロールをオフにしようとしましたが、コンテンツがスクロールしません。