2012-01-18 39 views
0

我想將一些自定義樣式應用於jquery加載對話框,但無法找到文檔中的任何內容來執行此操作。我如何設計jquery mobile加載微調器

+0

什麼jQuery的加載對話框你在說什麼? – 2012-01-18 04:18:41

+0

$ .mobile.showPageLoadingMsg() – Brian 2012-01-18 04:33:13

回答

5

當您找不到任何文檔時,您看起來在哪裏?源代碼。

我擡起頭看showPageLoadingMaphttps://github.com/jquery/jquery-mobile/blob/master/js/jquery.mobile.init.js。有關部分轉載於此:

showPageLoadingMsg: function() { 
    $html.addClass("ui-loading"); 
    if ($.mobile.loadingMessage) { 
     var activeBtn = $("." + $.mobile.activeBtnClass).first(); 

     $loader 
      .find("h1") 
       .text($.mobile.loadingMessage) 
       .end() 
      .appendTo($.mobile.pageContainer); 

     checkLoaderPosition(); 
     $window.bind("scroll", checkLoaderPosition); 
    } 
}, 

這裏,$html僅僅是$('html')參考,並$loader較早,因爲這定義:

// loading div which appears during Ajax requests 
// will not appear if $.mobile.loadingMessage is false 
var $loader = $("<div class='ui-loader '><span class='ui-icon ui-icon-loading'></span><h1></h1></div>"); 

所以看起來你可以調整這些樣式元素/類適當。該CSS選擇器可能是這樣的:

body.ui-loader { ... } 
div.ui-loader { ... } 
div.ui-loader span.ui-icon-loading { ... } 
div.ui-loader h1 { ... } 
...etc... 
相關問題