wiquery plugin: resize()

14 views
Skip to first unread message

Sprockets

unread,
Jul 2, 2011, 7:12:51 PM7/2/11
to wiquery-plugins
hi wiquery people,

i was investigating how to determine the height and width of a
component (e.g. a <div>) from wicket when the client resizes the
browser window. when seaching, i stumbled onto this jquery plugin:

http://benalman.com/projects/jquery-resize-plugin/

it provides a custom jquery resize() event for any component (e.g. not
just the browser-window) and executes a callback. that is a good
start.

i a simple wiquery plugin for it that creates a new ResizedEvent and
extends WiQueryAjaxEventBehavior to provide this information to the
server via ajax when the component is resized.

it is similar to the wiquery UI resizable but this event will also
fire the event if the component is resized when the window size
changes (AFAICT resizable only provided this information when the user
manually resized the component).

maybe someone out there will find it useful, if anyone is interested,
it can be downloaded from here:
http://dl.dropbox.com/u/21031425/wiquery-component-resizedevent.zip

feel free to integrate it into wiquery-plugins repository, probably
needs a bit of work first though...
Reply all
Reply to author
Forward
0 new messages