jquery - Can't load an specific image with fancybox -
i'm trying open fancybox image.
here's code (jsfiddle):
$(".open_fancybox").click(function() { var url='http://files.parse.com/773ee808-4477-4c78-9763-cbd6b532d477/a69470fc-c6be-45b7-a424-312a6b711d01-photoimage'; $.fancybox.open([ { href : url, title : '1st title' }, ], { padding : 0,fittoview: false,autosize:false }); return false; });
add type of content trying open (image in case) within script :
$(".open_fancybox").click(function () { var url = 'http://files.parse.com/773ee808-4477-4c78-9763-cbd6b532d477/a69470fc-c6be-45b7-a424-312a6b711d01-photoimage'; $.fancybox.open([{ href: url, title: '1st title', type: "image" // tell fancybox type of content }, ], { padding: 0, fittoview: false, autosize: false }); return false; }); why? because variable url doesn't have image extension (gif|jpg|png) fancybox can't figure out image.
see jsfiddle
for further information, can refer :
http://fancyapps.com/fancybox/#support ==>faq tab ==> no. 5
Comments
Post a Comment