Lightbox


Hi Thierry, I'm having trouble getting the lightbox functionality to work. I have installed it in my functions.php beans_uikit_enqueue_components( 'lightbox', 'add-ons' );

I have a test page set up with a single image:

<div class="uk-grid">
   <div class="uk-width-1-1">
      <img src="http://dallasdesign.uk/remembermelikethis/wp-content/uploads/2016/06/miles-evans-and-chambers.jpg" data-uk-lightbox title="" alt="">
   </div>
</div>

The lightbox begins to open but does not display the image. The browser console is showing me this JS error. TypeError: n.source is undefined

This is a my test page: http://dallasdesign.uk/remembermelikethis/test-3/


Hi Steve, this works for me:

<a  href="$mainimage['url']" data-uk-lightbox data-lightbox-type="image">
  <img  src="$thumbnail->src ">
</a>

In this case I show a larger image in the lightbox itself.


Thanks Bas! changed it to:

<a href="http://dallasdesign.uk/remembermelikethis/wp-content/uploads/2016/06/miles-evans-and-chambers.jpg" data-uk-lightbox data-lightbox-type="image"><img  src="http://dallasdesign.uk/remembermelikethis/wp-content/uploads/2016/06/miles-evans-and-chambers.jpg"></a>

and it's now working. Cheers.

Write a reply

Login or register to write a reply, it's free!