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
Post a Comment