Twitter Bootstapにajaxスピナーを備えた標準のポップアップウィンドウはありますか?あるべきですが、私はそれについて何も見つけていません。
13968 次
2 に答える
6
これは、Font Awesomeを使用して(受け入れられた回答で推奨されているように)Ajax呼び出しで機能し、モーダルスタイルを少し調整したものです。
<!-- CSS -->
<style>
#spinner-modal .modal-dialog,
#spinner-modal .modal-content,
#spinner-modal .modal-body {
background: transparent;
color: rgba(255,255,255,1);
box-shadow: none;
border: none;
}
</style>
<!--[ SPINNER MODAL ]-->
<div class="modal fade" id="spinner-modal">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-body text-center">
<h3><i class="fa fa-cog fa-spin"></i> Working...</h3>
</div>
</div>
</div>
</div>
<!--[ JS ]-->
<script>
$('#search-form-input').autocomplete({
source: '/search.php',
minLength: 2,
select: function(event, ui) {
$('#spinner-modal').modal('show');
var url = '/a/results/index.php?i=' + ui.item.item_id;
window.location.href = url;
}
});
</script>
于 2014-12-02T20:21:56.220 に答える
2
ブートストラップモーダルプラグインhttp://twitter.github.com/bootstrap/javascript.html#modalsを使用して、ポップアップでajaxコンテンツを読み込むことができます。
スピナーを使用するためのブートストラップ方法はありませんが、モーダルポップアップを表示する前に自分で行うことができます。
于 2013-02-20T08:37:51.810 に答える