Fancybox URL, - gif, jpg, pdf . , URL ".pdf", .
The decision made is good, because it can be done with the parameter typeduring fancybox initialization, however it will not work if you mixed the content (images and PDF together). In these scenarios, you can use the built-in attribute data-typeand mark each individual entry.
For example, you can do this:
<a href="getimages.php?id=123" data-type="image">
Show image
</a>
<a href="getpdf.php?id=123" data-type="iframe">
Show pdf
</a>
<a href="getajax.php?id=123" data-type="ajax" data-src="my/path/to/ajax/">
Show ajax content
</a>
... etc.
source
share