2012-07-07 63 views
0

我有一個彈出框,邀請用戶登錄後完成一個過程。在我們的常規Web應用程序中一切正常。在我們的移動網絡應用程序中,第一次索引頁被加載後,登錄彈出窗口不顯示。當頁面爲RELOADED時,彈出窗口顯示。彈出登錄後不加載,但加載頁面然後刷新

中的application.js

$(document).ready(function() { 
    $("h1").fadeIn(1000); 
    $('.fade').delay(2000).fadeOut(2000); 
    loadPopupBox(); # --------------------------------- line that loads pop up 
    $('.popupBoxClose').click(function() {    
     unloadPopupBox(); 
    }); 
    function unloadPopupBox() { 
     $('.step_pop').fadeOut("slow"); 
    }  
    function loadPopupBox() { 
     $('.step_pop').fadeIn("slow"); 
    }   
}); 
在index.mobile.erb

<% unless @step1 && @step2 && @step3 && @step4 %> 
    <%= render :partial => "steps_pop" %> 
<% end %> 

在_steps_pop.mobile.erb:

<div class="step_pop" style="width: 90%; height: 80%; left: 5%; top: 5%; "> 
    ... process description then yes or no 
</div> 

我們使用設計認證。

感謝您的幫助。的

+1

我以爲你是我在這裏的同一個問題是解決方案的http:/ /stackoverflow.com/a/11377137/1476757 – Adam 2012-07-08 17:19:25

回答

0

,而不是將彈出腳本中:

$(document).ready(function() 

我把它放在內:

$(document).delegate("#aboutPage", "pageinit", function()