Skip to content

bwheeler96/imageScale

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

imageScale

A jQuery Plugin for scaling images to fit any box, without stretching the aspect ratio.

Usage

Add the plugin to your website.

<script src="/path/to/imageScale.js" type="text/javascript" />

Call the .imageScale(); method on any image tag (<img>), and the plugin will automatically fill the image to the parent container, centering horizontally and/or vertically if necessary.

Advanced

Call the .imageScale([parent selector]); method, and the image will fill the box of the specified parent selector.

Dependencies

This plugin depends on the use of margin-top, margin-left, height, and width css attributes. Heighth, width, and margins are set in percent so they are completely scalable. Yay!

Contact

Questions, comments, and concerns, either here on GitHub or to [email protected]

About

A jQuery plugin for scaling images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published