Bootstrap Data Src
v1.0.0

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

View the Project on GitHub monkeymonk/bootstrap-data-src

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

Demo: http://monkeymonk.be/bootstrap-data-src.js/demo/

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