Skip to content

frontid/jQueryAspectRatioKeeper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQueryAspectRatioKeeper

Keeps the original proportion (aspect ratio) for any HTML tag like video, iframe, object, div, etc.

Sample: https://codepen.io/frontid/pen/RZVppP

Install

npm install jquery-aspect-ratio-keeper --save
// or
yarn add jquery-aspect-ratio-keeper
// or 
bower install jquery-aspect-ratio-keeper

Usage

// Keep the original video proportion.
$('video').aspectRatioKeeper()

Options

wrapperName: specifies the generated wrapper name. Desaults to 'tag-ark'

About

jQuery Aspect Ratio Keeper.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors