Glitchbone / fitstuff.js

Elements scaling with intrinsic ratio

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

#fitstuff.js

Elements scaling with intrinsic ratio

Inspired by fluidvids.js

##Installation

Install via bower:

bower install fitstuff.js --save

Or you can add js/fitstuff.js manually to your project

##Usage

With an IMG tag:

<img data-fitstuff src="foo.jpg" width="640" height="480" />

With any other tag:

<div data-fitstuff data-width="640" data-height="480"></div>

##Methods

Apply fitstuff to new elements added dynamically to the DOM:

fitstuff.update();

##Author

Adrien Glitchbone

##License

fitstuff.js is available under the MIT license. See the LICENSE file for more information.

About

Elements scaling with intrinsic ratio

License:MIT License


Languages

Language:JavaScript 51.5%Language:HTML 48.5%