jquery - Pop up does not load after log in, but loads if page is then refreshed -


i have pop box invites users complete process after log in. in our regular web app works fine. in our mobile web app, first time index page loaded after log in pop not displayed. when page reloaded pop display.

in application.js:

$(document).ready(function() { $("h1").fadein(1000); $('.fade').delay(2000).fadeout(2000); loadpopupbox(); # --------------------------------- line loads pop $('.popupboxclose').click( function() { unloadpopupbox(); }); function unloadpopupbox() { $('.step_pop').fadeout("slow"); } function loadpopupbox() { $('.step_pop').fadein("slow"); } }); 

in index.mobile.erb:

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

in _steps_pop.mobile.erb:

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

we using devise authentication.

thanks help.

instead of placing pop script within:

$(document).ready(function() 

i placed within:

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

Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -