2011-07-11 35 views

回答

10

首先,我建議你看看兩位老人回答:thisthis

要讓裝載DIV,顯示GIF動畫,並沒有文字,你應該改變例如「裝載」類的風格一樣

<style type="text/css"> 
    .ui-jqgrid .loading { 
     background: url(loader1.gif); 
     border-style: none; 
     background-repeat: no-repeat; 
    } 
</style> 

刪除默認文本「正在載入」與$.jgrid.defaults.loadtext=''並將「加載」div移到您想要的位置。它需要額外調整一些CSS樣式。例如

$("#load_list") 
    .css({position:'relative',left:'0',float:'left',width:'4px', 
      height:'4px','margin-top':'3px'}) 
    .prependTo('#pager_left'); 

在最後你會收到類似

enter image description here

請參見相應的演示here

+1

太棒了!非常有用的答案jQGrid再次奧列格! – FastTrack

+1

@FastTrack:不客氣! – Oleg

+0

對於那些尋找與FontAwesome而不是gif類似的方法。看看我的答案在這裏:https://stackoverflow.com/questions/4473690/jqgrid-need-to-change-progress-messageloading/47546944#47546944 – RedSands