Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

API - Fresco is not defined?

I'm attempting to use the API to trigger Fresco instead of galleria.io's lightbox. When I do, I get "Uncaught ReferenceError: Fresco is not defined".

<link rel="stylesheet" type="text/css" href="/static/fresco/css/fresco/fresco.css">
    <script scr="/static/fresco/js/fresco/fresco.js"></script>
    <script>
        (function() {
            var image_array_string = "http://216.12.103.3/img2.php?idx=2&id=1341916&img=1341916_1.jpg,http://216.12.103.3/img2.php?idx=2&id=1341916&img=1341916_2.jpg,http://216.12.103.3/img2.php?idx=2&id=1341916&img=1341916_3.jpg";
            var image_array = image_array_string.split(',');
            Galleria.loadTheme("https://cdnjs.cloudflare.com/ajax/libs/galleria/1.5.7/themes/classic/galleria.classic.min.js");
            Galleria.run('.galleria', {
                height: 0.75,
                lightbox: false,
                autoplay: 5000, // will move forward every 5 seconds
                extend: function(options) {
                    Galleria.log(this); // the gallery instance
                    Galleria.log(options); // the gallery options
                    // listen to when an image is shown
                    this.bind('image', function(e) {
                        Galleria.log(e); // the event object may contain custom objects, in this case the main image
                        Galleria.log(e.imageTarget); // the current image
                        // lets make galleria open a lightbox when clicking the main image:
                        $(e.imageTarget).click(this.proxy(function() {
                           //this.openLightbox();
                           Fresco.show(image_array, e.index);
                        }));
                    });
                }
            });
        }());
    </script>

Is there something I must do to initialize Fresco? I have jQuery 3+ loaded above this code, of course. Example page: http://458-sold.com/listing/idx/4058977/

If anyone could give me a push in the right direction I'd appreciate it.

Comments

Sign In or Register to comment.