0
https://lh4.ggpht.com/uB0Rq6-3If1Irf6aMJY7P9Er4BmHVNLqLP_cNNwnjEBpj7jPcwarTpjaowd066O6j70

This is an example of an image that I want to display in a Fancy Box but it will display random characters instead. Probably because of header image (I think). Please help to properly display this kind of image in a fancy box. Thanksenter image description here

Sample of the random displayed output of the fancy box after loading the image.

silent_coder14
  • 583
  • 2
  • 10
  • 38

1 Answers1

0

Try

$(document).ready(function(){
 $('.fancybox').fancybox({
  "type":"image"
 });
});

check http://fancybox.net/faq No.6 for v1.3.x ... or http://fancyapps.com/fancybox/#support No.5 for v2.x

EDIT: Added a DEMO here

JFK
  • 40,963
  • 31
  • 133
  • 306
  • @JohnRayPaulin any change for you to share a link? – JFK Aug 17 '12 at 04:39
  • i just downloaded the image before displaying it on the fancybox. I followed this question-answer here http://stackoverflow.com/questions/724391/saving-image-from-php-url-using-php (images ranges from 5-10 i think and it is not constant, i I have to download it every time i open the page). I will resort on this for now :) thanks – silent_coder14 Aug 17 '12 at 06:20
  • @JohnRayPaulin : I added a DEMO (see my edited answer) with the option `"type":"image"` that works perfectly fine with FF, Chrome and IE using the same link as in your post. – JFK Aug 17 '12 at 08:35
  • thanks, it looks great. i'll try it and come back if it will work for me.thanks. – silent_coder14 Aug 17 '12 at 11:38