monkeymonk / bootstrap-data-src

Tiny jQuery plugin to deal with responsive image delivery using Bootstrap breakpoints.

Home Page:http://monkeymonk.github.io/bootstrap-data-src/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bootstrap Data Src v 1.0.0

Tiny jQuery plugin to deal with responsive image delivery using Bootstrap breakpoints.

This little script use the Twitter Bootstrap classes: visible-*-block to know what media we are delivering.

Usage

  1. Include jQuery and Twitter Bootstrap files
  2. Include Bootstrap Data Src file
  3. Do $('.cool-img').dataSrc(); on document ready
  4. See example.html to know more

Options

{
    inview: false,  // lazyload
    offset: 0,      // used with inview
    resize: false   // update src when resize event is fired
}

Todo

  • refactor code
  • add Data Src to Bower
  • add lazyload capability

About

Tiny jQuery plugin to deal with responsive image delivery using Bootstrap breakpoints.

http://monkeymonk.github.io/bootstrap-data-src/


Languages

Language:HTML 76.6%Language:JavaScript 23.4%