same problem for me – infinite scroll
thank you for help
@tophboogie the problem with new Ajax loaded content is that the FacnyBox script needs to be made aware of it after it has loaded. This can be done if the script that loads this new content, triggers an event after the new content has loaded. If you know what that event is called, it is possible to create a little extra script which will make FancyBox rescan the new content… You could ask the Ajaxify WordPress Site plugin developer(s) if such an event is coded in their plugin and what handler it uses.
@eldenroot as far as I know, the Infinite scroll module triggers an event called ‘post-load’ which is also used in Easy FancyBox. In theory, the two should be compatible… Can you share a link?
@ravanh – OK, infinite scroll plugin was deleted from my webpage – many problems, lags and content issues…
But I would like to use your plugin with this:
http://wordpress.org/plugins/read-more-right-here/
There is a problem, that you click on the read more, the content is fully loaded but after you click on the image/video Fancy box is not loaded and it is opened in the new window/tab
Hi eldenroot, looking quickly through the script in the Read More Right Here plugin, it seems there is no event triggered after new content has loaded to which we can bind a re-scanning of that content to make FancyBox aware of any image or other media links inside…
The easiest would be if the developer of that plugin would add (it’s very easy) an event trigger called ‘post-load’ that is triggered after each post content has loaded. But if that’s not an option, it might still be possible to make fancybox aware of new content with some custom script that will need to be adapted to your theme.
For example, let’s say the ajax plugin loads new content inside a divs with class=”hentry”, then the following piece of javascript might do the trick:
<script type="text/javascript">
jQuery(document).on('ready', function() {
jQuery(".hentry").on("focusin", easy_fancybox_handler);
} );
</script>
Downside is that this solution is much more ‘expensive’ in terms of browser CPU time as it will fire the main fancybox function upon every user interaction (focus) inside any div with class=”hentry”…
Thank you. I think that the plugin is not updated for a long time… I will contact the developer.
BTW – I sent you an email, please reply me _)