title: Fancybox 3 API - Uncaught TypeError: cannot read property 'open' of undefined
body: <p>i'm trying to load fancybox 3 to my prestashop product images using javascript from an external JS file,
  but i get this error in my console : Uncaught TypeError: cannot read property 'open' of undefined.</p>
  
  <p>i'v been testing this code on local and it works fine.</p>
  
  <pre><code>&lt;a id="fancyboxlauncher" href="javascript:void(0)" &gt;Click me&lt;/a&gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>$('#fancyboxlauncher').on('click', function() {
  'use strict';
    $.fancybox.open([
      {
        src  : '{$image.bySize.home_default.url}',
        opts : {
          caption : '{$product.description_short nofilter}'
        }
      }
    ], {
      loop : false,
      hash : "test"
    });
  
  });
  </code></pre>