Andrey Hihlovskiy

Professional blog on groovy, gradle, Java, Javascript and other stuff.

jQuery sash (splitter) plugin

Task: you want to split your web-page into resizable panels. Users may drag splitters between panels left and right, up and down – adjusting the whole view to their liking. Also it should be easy to hide/show individual panels, together with their splitters.

Problem: how to do it with as less code as possible, so that you write:

$("#parentDiv").sash({ content1: "div1", content2: "div2" });

and the rest is done automatically?

Solution: use jQuery Sash Plugin.

See here: jQuery Sash Plugin online example
and there: jQuery Sash Plugin source code and documentation

JQuery

JQuery (Photo credit: Wikipedia)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: