GithubHelp home page GithubHelp logo

kinggggg / jquery-image-reloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from doomhz/jquery-image-reloader

0.0 2.0 0.0 91 KB

Tries to reload images in case of a request error. Solves the Amazon S3 image request delay.

Home Page: http://dumitruglavan.com

HTML 49.99% CSS 4.12% JavaScript 45.90%

jquery-image-reloader's Introduction

jQuery Image Reloader

Forces the browser to retry loading the broken images. A decent solution for images stored in a cloud (i.e Amazon S3).

Why and when to use it?

This plugin is effective when you load images from a cloud (i.e. Amazon S3) and the CDN has a delay until the image is accessible. The browser will display a broken image icon instead and won't retry to reload it. jQuery Image Reloader will take care of that.

Plugin code

The only code you need to activate the plugin is this:

$(".slow-images").imageReloader();

Options:

loadingClass: "loading-image" The plugin hides the original image until it's successfully loaded and replaces it with a DIV that will take this CSS class. reloadTime: 1500 Set up the time between the reload attempts. maxTries: 10 Set up how many reload attempts should be made until the broken icon is displayed.

jquery-image-reloader's People

Contributors

doomhz avatar

Watchers

James Cloos avatar zeek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.