uSizer 1.0

Useful class for resize DOM elements



Details

Author
Jose Luis Quintana
Current version
1.0
GitHub
joseluisq/usize
Downloads
549
Category
Utilities
Tags
Report
GitHub Issues

Releases


How to use

The js code :

    #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();

The html code :

    #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 here

Base Doc

Public Methods :

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

Discuss

A note on comments here: These comments are moderated. No comments will show up until they are approved. Comments that are not productive (i.e. inflammatory, rude, etc) will not be approved.

Found a bug in this plugin? Please report it this repository's Github Issues.

blog comments powered by Disqus