Skip to content
Useful Mootools class for resize DOM objects
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
assets First commit !
nbproject
test First commit !
README.md
license.txt First commit !
package.yml First commit !

README.md

uSizer

Useful Mootools class for resize DOM elements.

How to use

JS:

var sizer = new uSizer();

sizer.setParent($('parent'));
sizer.setChild($('child'));
sizer.crop(0,0);

sizer.setParent($('parent2'));
sizer.setChild($('child2'));
sizer.centerCrop();

sizer.setParent($('parent3'));
sizer.setChild($('child3'));
sizer.centerCropResize();

HTML :

<div id="parent">
    <div id="child" class="box">Child !</div>
</div>

<div id="parent2">
    <div id="child2" class="box">Child !</div>
</div>

<div id="parent3">
    <div id="child3" class="box">Child !</div>
</div>

Live Demo

uSizer live demo

Screenshots

Screenshot

Base Doc

Public Methods :

  • uSizer.setParent()
  • uSizer.setChild()
  • uSizer.resizeToHeight()
  • uSizer.resizeToWidth()
  • uSizer.getPropWidth()
  • uSizer.getPropHeight()
  • uSizer.scale()
  • uSizer.crop()
  • uSizer.centerCrop()
  • uSizer.centerCropResize()

License

Released under MIT Licence

Something went wrong with that request. Please try again.