https://github.com/doodlewind/easyscale
add responsive support for fixed width elements
https://github.com/doodlewind/easyscale
Last synced: about 1 year ago
JSON representation
add responsive support for fixed width elements
- Host: GitHub
- URL: https://github.com/doodlewind/easyscale
- Owner: doodlewind
- Created: 2016-09-30T00:06:09.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-30T00:06:20.000Z (almost 10 years ago)
- Last Synced: 2025-02-17T02:13:48.694Z (over 1 year ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# easyScale
Add responsive support for fixed width elements. [View example](http://ewind.us/platform/doc/easy-scale.html)
## Install
``` html
```
## Usage
### HTML
``` html
```
### CSS
``` css
#foo, .bar, #baz {
margin: 10px auto 10px auto;
height: 200px;
width: 800px;
background-color: #56CBF9;
}
```
### JS
``` js
$.fn.easyScale([
{ el: "#foo", minBound: [0, 0], maxBound: [1300, 500] },
{ el: ".bar", minBound: [0, 0], maxBound: [1000, 500] },
{ el: "#baz", minBound: [600, 400], maxBound: [1000, 500] }
]);
```
## Options
* `el`: required, jQuery selector `string`
* `minBound`: required, `[numberX, numberY]` thereshold to stop zooming
* `maxBound`: required, `[numberX, numberY]` thereshold to start zooming
## License
MIT