1

I'm using the newest version of Fancybox 3 and I'm trying to implement some options like not showing the toolbar or a different transition effect. I have the css in the header and jquery is at the end of the source code. Why do the options not work? I've used Fancybox earlier without a problem.

<script src="https://code.jquery.com/jquery-2.2.4.js"></script>
<script src="{{ paths.theme }}js/scripts.js"></script>
<script src="https://cdn.jsdelivr.net/gh/fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    $('[data-fancybox]').fancybox({

    toolbar: "false",
});
});
</script>
  • Do you understand that it is not possible to give a proper answer without seeing live page/demo? You might have JS error somewhere, but we can not know that by looking at some random code snippet. – Janis Mar 26 '19 at 06:44

1 Answers1

0

Is this the real output? Then this line -

<script src="{{ paths.theme }}js/scripts.js"></script>

will break further execution of JS code and ... nothing will work.

Janis
  • 8,593
  • 1
  • 21
  • 27
  • No, that is just twig code in the template, in the source code this is replaced by a theme url. All other scripts I use work well. Fancybox is also working... except for the options I want to apply. Demo is: https://beta.willembosma.nl/blog/test –  Mar 26 '19 at 07:44
  • Oh, in that case, try replacing `toolbar: "false"` with `toolbar: false`. – Janis Mar 26 '19 at 07:49
  • `"false"` is not the same as `false`, because it is actually a string. – Janis Mar 26 '19 at 07:59