I am using the following script to load a placeholder image, if an image src png is not available/error's:
<script type="text/javascript">
jQuery("img").error(function () {
jQuery(this).unbind("error").attr("src", "/images/people_placeholder.png");
});
</script>
I am loading the above script just before the closing </body>
tag.
It works fine on Chrome desktop & shows the placeholder image.
It doesn't work on Safari Desktop or on Mobile phone in Safari/Chrome
Any idea's?
` element so that the handler can be attached before any images attempt to load.
– Cue Jan 08 '15 at 10:01