W
W
workRave2016-04-02 14:52:06
JavaScript
workRave, 2016-04-02 14:52:06

FancyBox - not working. Why do plugins conflict?

Oh great programming Jedi...
Example: karlson-tour.ru/karlson-tour-work/theme.html
Why when changing:

jQuery(document).ready(function() {
      App.init();
      LayerSlider.initLayerSlider();
      StyleSwitcher.initStyleSwitcher();
      OwlCarousel.initOwlCarousel();
      OwlRecentWorks.initOwlRecentWorksV2();
    });

On the:
jQuery(document).ready(function() {
      App.init();
      LayerSlider.initLayerSlider();
FancyBox.initFancybox();
      StyleSwitcher.initStyleSwitcher();
      OwlCarousel.initOwlCarousel();
      OwlRecentWorks.initOwlRecentWorksV2();
    });


The slider stops working.
FancyBox still doesn't work.
What is the reason for my failures?

upd: updated the code in the example, taking into account the decision of bogdan0083

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bogdan0083, 2016-04-02
@workRave

In the js / plugins folder, you have functions for initializing the slider, layer slider and changing styles, but the FancyBox function that you initialize is not there. Or I just can't find it.
And the slider stops working due to an error. If you put FancyBox.initFancybox() at the very beginning, then all scripts will fall off.
Try to include fancyBox as written in the doc: fancyapps.com/fancybox
$(".fancybox").fancybox();
Where .fancybox is the name of the desired class

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question