How to get Fancybox to work after AutoPagination starts?

Allon Prooit Posted in Beginning Developers 4 years ago

I use Fancybox 3.3.3 with OSSN 5.0... It works great for the first 10 posts, but once AutoPagination loads, no more fancybox. The fancybox code is so simple. How to change it so as to make it work right? Any thoughts?
The code...
$(document).ready(function(){
$(".ossn-wall-item .post-contents img").fancybox({
'titleShow' : false,
top: '75px',
afterClose: function(){
$(".ossn-wall-item .post-contents img").show();
},
});
});

Replies
us Allon Prooit Replied 4 years ago

Got it to work finally.
The new code...
$(document).ready(function(){
$(".ossn-wall-item .post-contents img").fancybox({
selector : '.ossn-wall-item .post-contents img',
top: '75px',
afterClose: function(){
$(".ossn-wall-item .post-contents img").show();
},
});
});