Small JavaScript To Fix Broken Images – fixBroken

Category: Image , Javascript | March 23, 2015
Author:jonathan-fielding
Views Total:422 views
Official Page:Go to website
Last Update:March 23, 2015
License:MIT

Preview:

Small JavaScript To Fix Broken Images – fixBroken

Description:

fixBroken is a simple yet useful JavaScript library that replace the broken image which can not be found in your web server with a custom placeholder using Html5 data-attribute.

Basic usage:

Load the fixBroken JavaScript library in your project.

<script src="src/fixBroken.js"></script>

use data-fallback attribute to specify the placeholder image source.

<img src="404.png" data-fallback="placeholder.jpg">

Initialization.

fixImages.init();

You Might Be Interested In:


Leave a Reply