I am using shadowbox to open up and display a larger version of the image than the one clicked on to initiate the plugin.
Everything works fine... However my image are dynamic, so a image source that I reference to could easily be missing from the server. If the image is missing my shadowbox opens the overlay and in place of the image, it has a 1px x 1px little placeholder. I am trying to figure out how to adapt the plugin or instruct it to open up a box that throws a little 404 error message similar to the one fancy box has.
I could change to fancybox but my project also uses the shadowbox to popup videos. So then I would still have to keep shadowbox for my videos and use fancybox for my images which is not ideal.
I find it weird that no-one tried to add a 404 message to shadowbox before.
I can't post a test link as the url is secure and there is too much code attached to drop everything into a jsfiddle.
I have the jquery 1.7.1 & shadowbox 3.0.3 plugins attached in the head of my page, the plugin is called as:
<script type="text/javascript">
Shadowbox.init({
// skip the automatic setup again, we do this later manually
skipSetup: true
});
$(document).ready(function () {
// set up all anchor elements with a "shadowboxgallery" class to work with Shadowbox
Shadowbox.setup("a.shadowboxgallery", {
gallery: "Portfolio",
displayCounter: false
});
});
</script>
My link in my code reads:
<a class="shadowboxgallery" rel="shadowbox[Portfolio]" href="UrlToLargeImg"><img height="420" src="UrlToImg" alt="" /></a>
Once again, my problem is when "UrlToLargeImg" cannot be found, shadowbox opens the overlay and in place of the image, it has a 1px x 1px little placeholder. I am trying to figure out how to adapt the plugin or instruct it to open up a box that throws a little 404 error message similar to the one fancy box has.
Thank you in advance.