R
R
Royorso2014-07-20 03:30:46
JavaScript
Royorso, 2014-07-20 03:30:46

How to properly initialize the fancybox script to make the gallery work?

There is a gallery: www.dkad.ru/#sc-gallery Fancybox
is attached to it...
- css-file: www.dkad.ru/assets/css/jquery.fancybox.css
- js-file: www.dkad.ru /assets/js/jquery.fancybox.js
- sprites: www.dkad.ru/assets/img/fancybox
The main scripts are described in this file: www.dkad.ru/assets/js/scripts.js
Everything seems to be configured, but not works, motherfucker!
Working gallery source here: vivaco.com/demo/ventcamp/index-overlay.html#elements
Tried to initiate fancybox with the line:
$('.fancybox').fancybox();
});
fancy didn't work, and the site hung on the preloader.
Can you please tell me how to trigger the launch of fancybox when clicking on the photo?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
sasha, 2014-07-20
@Royorso

$('.fancybox').fancybox()
I typed the initializor on your site and the fencibox worked
and also make sure that the link is exactly the picture, but not some of the links you have nothing
ps. wrap initializer in $(document).ready()

R
Royorso, 2014-07-20
@Royorso

I inserted this piece into index.html:

<script type="text/javascript">
  $(document).ready(function() {
    $(".fancybox").fancybox();
  });
</script>

fancy didn't work for me :(

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question