/**\r
* Bind an event handler to the "resize" JavaScript event, or trigger that event on an element. \r
*/\r
- public void resize(final Function f) {\r
- \r
+ public GQuery resize(final Function f) {\r
+ return bindOrFire(EventsListener.ONRESIZE, null, f);\r
}\r
\r
/**\r
* Don't apply events on text and comment nodes !!
*/
private static boolean isEventCapable(Node n){
- return n.getNodeType() != 3 && n.getNodeType() != 8;
+ return n.equals(GQuery.window) || n.getNodeType() != 3 && n.getNodeType() != 8;
}
public Events(GQuery gq) {