Skip to content

Responsive Img is a jQuery plugin that changes an image's src attribute based on its container's width.

Notifications You must be signed in to change notification settings

drewbrolik/Responsive-Img

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Responsive-Img

Responsive Img is a jQuery plugin that changes an image's src attribute based on its container's width.

The plugin requires only 2 files (10kb total uncompressed).

ResponsiveImg.com

Basic usage

$("img").responsiveImg();

or

$("img").responsiveImg({
  breakpoints : {
    "_small":360,
    "_medium":780,
    "_large":900
  },
  srcAttribute : "src",
  pathToPHP : "js",
  createNewImages : true,
  jpegQuality : 90,
  callback:false
});

Default Options

{
	breakpoints : {
    "_small":360,
    "_medium":780,
    "_large":900
  },
  srcAttribute : "src",
  pathToPHP : "js",
  createNewImages : true,
  jpegQuality : 90,
  callback:false
}

About

Responsive Img is a jQuery plugin that changes an image's src attribute based on its container's width.

Resources

Stars

Watchers

Forks

Packages

No packages published