0

Fancybox keeps opening these images in new windows.

There are no JS errors in console.

Here is my HTML:

<a class="fancybox" rel="group" href="//fpoimg.com/1200x800">
  <img src="//fpoimg.com/80x80" />
</a>
<a class="fancybox" rel="group" href="//fpoimg.com/1200x800">
  <img src="//fpoimg.com/80x80" />
</a>
<a class="fancybox" rel="group" href="//fpoimg.com/1200x800">
  <img src="//fpoimg.com/80x80" />
</a>

Here is my JS:

$(document).ready(function() {
  $("a.fancybox").fancybox();
});

Is it something to do with them being remote images? I've never had this not work.

Racking my brain here.

Thanks for any help.

Corey
  • 2,453
  • 4
  • 35
  • 63

1 Answers1

2

I'm pretty sure fancybox, isn't recognizing those as pictures since they're missing a proper image extension.

Inspecting the code and modifing it to this, makes the lightbox effect work. (Just used a random jquery image)

<a class="fancybox" rel="group" href="http://jquery.com/jquery-wp-content/themes/jquery/images/logo-jquery.png"><img src="//fpoimg.com/80x80"></a>
YourFriend
  • 410
  • 1
  • 5
  • 13