Panel Widget
Panel widget is a container. It can hold other user interface elements in an organized way. It support horizontal and vertical layout of it's child elements. Panel can be made draggable and resizable. There are plenty of configuration options for panel.
Basic Usage $.domLoaded(function() { $.get("#pan").widget("panel", CONFIG_JSON ); }
Configuring Options
It contains array of JSON objects. The properties are mentioned below.
Panel Widget Examples Example 1
JS
HTML
$.domLoaded( function() { $.get("#pan1").widget("panel", { layout : "vertical", dim : { wid : 380, ht : 150}, }); $.get("#pan2").widget("panel", { layout: "horizontal", dim : { wid : 380, ht : 150} }); $.get(".uname").widget("textbox", { watermark : "Username", validation : "alphanumeric" }); $.get(".email").widget("textbox", { watermark : "Email", validation : "email" }); $.get(".btn").widget("button", { text : "Log In" }); });
Result
Example 2
JS
HTML
$.domLoaded( function() { $.get("#pan1").widget("panel", { layout : "vertical", dim : { wid : 200, ht : 200}, pos : { x : 0 , y : 100 } }); $.get("#pan2").widget("panel", { layout: "horizontal", dim : { wid : 200, ht : 200}, pos : { x : 300 , y : 0 } }); });
Result
Example 3
JS
HTML
$.domLoaded( function() { $.get("#pan1").widget("panel", { draggable : true, dim : { wid : 100, ht : 100} }); $.get("#pan4").widget("panel", { draggable : "parent", dim : { wid : 100, ht : 100} }); });
Result
Example 4
JS
HTML
$.domLoaded( function() { $.get("#pan2").widget("panel", { draggable : "x", dim : { wid : 100, ht : 100} }); $.get("#pan3").widget("panel", { draggable : "y", dim : { wid : 100, ht : 100} }); });
Result
Example 5
JS
HTML
$.domLoaded( function() { $.get("#pan3").widget("panel", { draggable : true, dim : { wid : 150, ht : 150}, handle : $.get("#pan3 h3") }); });
Result
Example 6
JS
HTML
$.domLoaded( function() { $.get("#pan3").widget("panel", { draggable : true, dim : { wid : 100, ht : 100}, dragRangeX : { min : 10 , max : 400}, dragRangeY : { min : 50 , max : 200} }); });
Result
Example 7
JS
HTML
$.domLoaded( function() { $.get("#pan1").widget("panel", { nostyle : true, draggable : true, dim : { wid : 200, ht : 150} }); });
Result
Example 8
JS
HTML
$.domLoaded( function() { $.get("#pan3").widget("panel", { resizable : true, dim : { wid : 100, ht : 100} }); });
Result
Example 9
JS
HTML
$.domLoaded( function() { $.get("#pan3").widget("panel", { resizable : true, dim : { wid : 100, ht : 100}, minSize : { wid : 50 , ht : 50}, maxSize : { wid : 200, ht : 200} }); });
Result
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||