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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -