2013-01-08 18 views
0

請看看這個小提琴http://jsfiddle.net/GkfY7/jQuery Mobile的選擇刷新,樣式正在添加了錯誤的地方

可有人請向我解釋,爲什麼造型(和文本),而不是被可能刷新到DIV?

我覺得問題在刷新?

$('#survey [data-role="fieldcontain"]').fieldcontain(); 
    $('#survey [data-role="fieldcontain"]').fieldcontain('refresh',true); 
    $('#survey [data-role="controlgroup"]').controlgroup(); 
    $('#survey [data-role="controlgroup"]').controlgroup('refresh',true); 
    $('#survey').selectmenu(); 
    $('#survey').selectmenu('refresh',true); 

TIA,

丹尼爾

+0

什麼造型你需要什麼? –

+0

jQuery Mobile的樣式... 現在有一個選擇 - 實際上應該有兩個,它們在DOM中,但不是由jQuery Mobile設計。 –

回答

1
 Try Changing the last part of your code to: 

     $('#survey').append(output.join('')); 
     $('#survey [data-role="fieldcontain"]').fieldcontain(); 
     $('#survey [data-role="fieldcontain"]').fieldcontain('refresh',true); 
     $('#survey [data-role="controlgroup"]').controlgroup(); 
     $('#survey [data-role="controlgroup"]').controlgroup('refresh',true); 
     $('#sc1, #sc3').selectmenu(); 
     $('#sc1, #sc3').selectmenu('refresh',true); 
+0

Wauw!這工作... 現在我只需要「收集」所有的#scX的數組或字符串... –

+0

作爲一個方面說明...我的按鈕不趕上jQuery的移動樣式...? - 修正 –

+1

嘗試使用(使用type = submit)$('[type =「submit」]')。button(); $('[type =「submit」]')。button('refresh'); – Rajiv007

相關問題