ruby on rails - Jquery fancybox doesnt show - only after page reload -


this view:

<div id='profile_galery'>        <ul> <li class='big'><%=link_to image_tag(@profile.user.get_avatar(:large) ), @profile.user.get_avatar(:very_large), :class => 'fancybox'%></li> 

and js:

$(document).on("ready page:change", function() { $(".fancybox").fancybox({         openeffect  : 'elastic'     }); }); 

when go page image fancybox class , click on - there no fancybox but... html change , page locked. seems fancybox opened did not show , blocked everything. when reload page - fancybox works. whats going on?

try add parent option

$('.fancybox').fancybox({ parent: "body"}); 

Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -