2013-02-20 52 views

回答

2

您可以使用引導模式插件http://twitter.github.com/bootstrap/javascript.html#modals在彈出窗口中加載ajax內容。

沒有引導方式讓微調,但你可以在顯示模式彈出之前自己做。

+1

[字體真棒擁有紡圖標](HTTP ://fortawesome.github.com/Font-Awesome/#examples)Font Awesome是標準圖標的替代品。 – 2013-02-20 08:42:55

6

這是爲我工作使用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>