Answer the question
In order to leave comments, you need to log in
How to make ajax fancybox gallery?
Actually, it is necessary that the link opens the fancybox gallery, but the pictures must be loaded via ajax in order not to load the page, since there will be many such blocks
<div class="item-wr">
<a href="" class="button fancy-link">Посмотреть галерею</a>
<!-- эти картинки должны подгружаться через ajax -->
<img class="img-gallery" src="img-1" alt="">
<img class="img-gallery" src="img-2" alt="">
<img class="img-gallery" src="img-3" alt="">
</div>
Answer the question
In order to leave comments, you need to log in
It already has AJAX content loading
$('#button').on('click', function(){
$.fancybox({
width: 400,
height: 400,
autoSize: false,
href: 'http://www.example.com/some-ajax-data.php',
type: 'ajax'
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question