GithubHelp home page GithubHelp logo

jmarmolejos / nivo-slider Goto Github PK

View Code? Open in Web Editor NEW

This project forked from codeinwp/nivo-slider-jquery

0.0 2.0 0.0 1.3 MB

Lazy Nivo Slider - lazy loading of images for "The Most Awesome jQuery Image Slider"

Home Page: http://powers1.net/lazy-load-images-nivo-slider

License: MIT License

nivo-slider's Introduction

Lazy Loading Nivo Slider

A fork of Nivo Slider enabling lazy loading of images.

Use cases:

  • Dozens of images in the slideshow
  • Very large images
  • Mobile environments

Usage

Works exactly like the existing Nivo Slider with one little change. Add a data-src attribute to your images:

Before:

<img src="my-image.jpg" alt="" title="Caption for my image.">

After:

<img data-src="my-image.jpg" alt="" title="Caption for my image.">

And that's it!

Though it's highly recommended to include a src to small placeholder image for valid HTML markup. (And for non-javascript users). Note that data-src has precedence over src

View the live example: http://leepowers.net/files/nivo/demo/demo-lazy.html

See demo/demo-lazy.html in the repository for example code. (Or view source on the demo)

Events

The custom onImageLoad event is exposed and triggered whenever an image starts loading. May be called multiple times per image.

About the author

Forked by Lee Powers: http://leepowers.net

I've needed this for a while for slideshows with large images or a large number of images. Tried dabbling in creating my own jQuery slideshow plugin, but Nivo already has 99% of what I'm looking for. Reading this Stack Overflow question provided any additional push needed to get this working!

About Nivo Slider

To find out more about Nivo Slider visit the home page at http://nivo.dev7studios.com

Nivo Slider GitHub Project Page: https://github.com/ho-nl/Nivo-Slider

nivo-slider's People

Contributors

gilbitron avatar jzmudzinski avatar leepowers avatar

Watchers

 avatar  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.