2011-01-31 71 views
6

我Jgrowl代碼:JGrowl設置主題

$(document).ready(function() { 
     $.jGrowl("<strong>Error!</strong><br />An invalid ID was passed and your template could not be loaded", { sticky: true, theme: 'test' }); 
    }); 

和我的Jgrowl CSS CSS是:

.test{ 
    background-color:  #000000; 
} 

但它不應用該CSS的盒子。我可能會濫用主題選項,但我正努力在其上找到大量文檔。

回答

16

.test背景顏色被「div.jGrowl div.jGrowl-notification」樣式覆蓋。 你可以做的。測試風格是非常重要:

.test{ 
    background-color:  #000000 !important; 
} 

或更具體的訪問。測試類,像這樣:

"div.jGrowl div.jGrowl-notification.ui-state-test" 

這將覆蓋它太