https://github.com/manolo/gwtquery-resize-plugin
A gwtQuery plugin adding resize support to elements.
https://github.com/manolo/gwtquery-resize-plugin
Last synced: 4 months ago
JSON representation
A gwtQuery plugin adding resize support to elements.
- Host: GitHub
- URL: https://github.com/manolo/gwtquery-resize-plugin
- Owner: manolo
- Created: 2015-03-19T23:12:06.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-05-18T15:28:37.000Z (about 10 years ago)
- Last Synced: 2024-12-30T18:38:13.815Z (5 months ago)
- Language: Java
- Size: 148 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Introduction
A gwtQuery plugin which adds `resize` event support to any DOM element.It uses a hidden html object to observe size changes in the container.
It is mandatory that the container has a relative position, or any other
style allowing absolute children to change when the container does.It is inspired on:
http://www.backalleycoder.com/2013/03/18/cross-browser-event-based-element-resize-detection/
and
http://benalman.com/projects/jquery-resize-plugin/## Demo
http://manolo.github.io/gwtquery-resize-demo/index.html
## Usage
1. You only have to drop the .jar file in your classpath, or add this dependency to your project:
```
com.googlecode.gwtquery.plugins
resize-plugin
1.0-SNAPSHOT
provided
```
2. Then use it as any other gQuery plugin through the `as()` method
```
// Bind resize event
$(selector)
.as(Resize)
.on("resize", new Function() {...});// Unbind
$(selector).off("resize");// You can use as well the GQuery `resize()` method.
$(selector).as(Resize).resize(new Function(){...});
```
## Browser compatibilityAny GWT supported browser.