Added: ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/dialog.html
URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/dialog.html?rev=956651&view=auto ============================================================================== --- ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/dialog.html (added) +++ ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/dialog.html Mon Jun 21 17:45:18 2010 @@ -0,0 +1,1603 @@ + +<ul class="UIAPIPlugin-toc"> +<li><a href="#overview">Overview</a></li> +<li><a href="#options">Options</a></li> +<li><a href="#events">Events</a></li> +<li><a href="#methods">Methods</a></li> +<li><a href="#theming">Theming</a></li> +</ul> +<div class="UIAPIPlugin"> + <h1>jQuery UI Dialog</h1> + <div id="overview"> + <h2 class="top-header">Overview</h2> + <div id="overview-main"> + <p>A dialog is a floating window that contains a title bar and a content area. The dialog window can be moved, resized and closed with the 'x' icon by default.</p> +<p>If the content length exceeds the maximum height, a scrollbar will automatically appear.</p> +<p>A bottom button bar and semi-transparent modal overlay layer are common options that can be added.</p> +<p>A call to <code>$(foo).dialog()</code> will initialize a dialog instance and will auto-open the dialog by default. If you want to reuse a dialog, the easiest way is to disable the "auto-open" option with: <code>$(foo).dialog({ autoOpen: false })</code> and open it with <code>$(foo).dialog('open')</code>. To close it, use <code>$foo.dialog('close')</code>. A more in-depth explanation with a full demo is available on <a href="http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/" class="external text" title="http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/">the Nemikor blog</a>.</p> + </div> + <div id="overview-dependencies"> + <h3>Dependencies</h3> + <ul> +<li>UI Core</li> +<li>UI Draggable (Optional)</li> +<li>UI Resizable (Optional)</li> +</ul> + </div> + <div id="overview-example"> + <h3>Example</h3> + <div id="overview-example" class="example"> +<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul> +<p><div id="demo" class="tabs-container" rel="300"> +A simple jQuery UI Dialog.<br /> +</p> +<pre>$("#dialog").dialog(); +</pre> +<p></div><div id="source" class="tabs-container"> +</p> +<pre><!DOCTYPE html> +<html> +<head> + <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> + <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> + + <script> + $(document).ready(function() { + $("#dialog").dialog(); + }); + </script> +</head> +<body style="font-size:62.5%;"> + +<div id="dialog" title="Dialog Title">I'm in a dialog</div> + +</body> +</html> +</pre> +<p></div> +</p><p></div> + </div> + </div> + <div id="options"> + <h2 class="top-header">Options</h2> + <ul class="options-list"> + +<li class="option" id="option-disabled"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-disabled">disabled</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>Disables (true) or enables (false) the dialog. Can be set when initialising (first creating) the dialog.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>disabled</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ disabled: true });</code></pre> +</dd> + + +<dt> + Get or set the <code>disabled</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var disabled = $( ".selector" ).dialog( "option", "disabled" ); +//setter +$( ".selector" ).dialog( "option", "disabled", true );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-autoOpen"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-autoOpen">autoOpen</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">true</dd> + + </dl> + </div> + <div class="option-description"> + <p>When <i>autoOpen</i> is <i>true</i> the dialog will open automatically when <i>dialog</i> is called. If <i>false</i> it will stay hidden until <i>.dialog("open")</i> is called on it.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>autoOpen</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ autoOpen: false });</code></pre> +</dd> + + +<dt> + Get or set the <code>autoOpen</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var autoOpen = $( ".selector" ).dialog( "option", "autoOpen" ); +//setter +$( ".selector" ).dialog( "option", "autoOpen", false );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-buttons"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-buttons">buttons</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Object</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">{ }</dd> + + </dl> + </div> + <div class="option-description"> + <p>Specifies which buttons should be displayed on the dialog. The property key is the text of the button. The value is the callback function for when the button is clicked. The context of the callback is the dialog element; if you need access to the button, it is available as the target of the event object. +</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>buttons</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ buttons: { "Ok": function() { $(this).dialog("close"); } } });</code></pre> +</dd> + + +<dt> + Get or set the <code>buttons</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var buttons = $( ".selector" ).dialog( "option", "buttons" ); +//setter +$( ".selector" ).dialog( "option", "buttons", { "Ok": function() { $(this).dialog("close"); } } );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-closeOnEscape"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-closeOnEscape">closeOnEscape</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">true</dd> + + </dl> + </div> + <div class="option-description"> + <p>Specifies whether the dialog should close when it has focus and the user presses the esacpe (ESC) key.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>closeOnEscape</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ closeOnEscape: false });</code></pre> +</dd> + + +<dt> + Get or set the <code>closeOnEscape</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var closeOnEscape = $( ".selector" ).dialog( "option", "closeOnEscape" ); +//setter +$( ".selector" ).dialog( "option", "closeOnEscape", false );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-closeText"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-closeText">closeText</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">'close'</dd> + + </dl> + </div> + <div class="option-description"> + <p>Specifies the text for the close button. Note that the close text is visibly hidden when using a standard theme.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>closeText</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ closeText: 'hide' });</code></pre> +</dd> + + +<dt> + Get or set the <code>closeText</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var closeText = $( ".selector" ).dialog( "option", "closeText" ); +//setter +$( ".selector" ).dialog( "option", "closeText", 'hide' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-dialogClass"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-dialogClass">dialogClass</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">''</dd> + + </dl> + </div> + <div class="option-description"> + <p>The specified class name(s) will be added to the dialog, for additional theming.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>dialogClass</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ dialogClass: 'alert' });</code></pre> +</dd> + + +<dt> + Get or set the <code>dialogClass</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var dialogClass = $( ".selector" ).dialog( "option", "dialogClass" ); +//setter +$( ".selector" ).dialog( "option", "dialogClass", 'alert' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-draggable"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-draggable">draggable</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">true</dd> + + </dl> + </div> + <div class="option-description"> + <p>If set to true, the dialog will be draggable will be draggable by the titlebar.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>draggable</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ draggable: false });</code></pre> +</dd> + + +<dt> + Get or set the <code>draggable</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var draggable = $( ".selector" ).dialog( "option", "draggable" ); +//setter +$( ".selector" ).dialog( "option", "draggable", false );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-height"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-height">height</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Number</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">'auto'</dd> + + </dl> + </div> + <div class="option-description"> + <p>The height of the dialog, in pixels. Specifying 'auto' is also supported to make the dialog adjust based on its content.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>height</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ height: 530 });</code></pre> +</dd> + + +<dt> + Get or set the <code>height</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var height = $( ".selector" ).dialog( "option", "height" ); +//setter +$( ".selector" ).dialog( "option", "height", 530 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-hide"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-hide">hide</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">null</dd> + + </dl> + </div> + <div class="option-description"> + <p>The effect to be used when the dialog is closed.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>hide</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ hide: 'slide' });</code></pre> +</dd> + + +<dt> + Get or set the <code>hide</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var hide = $( ".selector" ).dialog( "option", "hide" ); +//setter +$( ".selector" ).dialog( "option", "hide", 'slide' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-maxHeight"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-maxHeight">maxHeight</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Number</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>The maximum height to which the dialog can be resized, in pixels.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>maxHeight</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ maxHeight: 400 });</code></pre> +</dd> + + +<dt> + Get or set the <code>maxHeight</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var maxHeight = $( ".selector" ).dialog( "option", "maxHeight" ); +//setter +$( ".selector" ).dialog( "option", "maxHeight", 400 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-maxWidth"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-maxWidth">maxWidth</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Number</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>The maximum width to which the dialog can be resized, in pixels.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>maxWidth</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ maxWidth: 600 });</code></pre> +</dd> + + +<dt> + Get or set the <code>maxWidth</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var maxWidth = $( ".selector" ).dialog( "option", "maxWidth" ); +//setter +$( ".selector" ).dialog( "option", "maxWidth", 600 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-minHeight"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-minHeight">minHeight</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Number</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">150</dd> + + </dl> + </div> + <div class="option-description"> + <p>The minimum height to which the dialog can be resized, in pixels.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>minHeight</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ minHeight: 300 });</code></pre> +</dd> + + +<dt> + Get or set the <code>minHeight</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var minHeight = $( ".selector" ).dialog( "option", "minHeight" ); +//setter +$( ".selector" ).dialog( "option", "minHeight", 300 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-minWidth"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-minWidth">minWidth</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Number</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">150</dd> + + </dl> + </div> + <div class="option-description"> + <p>The minimum width to which the dialog can be resized, in pixels.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>minWidth</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ minWidth: 400 });</code></pre> +</dd> + + +<dt> + Get or set the <code>minWidth</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var minWidth = $( ".selector" ).dialog( "option", "minWidth" ); +//setter +$( ".selector" ).dialog( "option", "minWidth", 400 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-modal"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-modal">modal</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>If set to true, the dialog will have modal behavior; other items on the page will be disabled (i.e. cannot be interacted with). Modal dialogs create an overlay below the dialog but above other page elements.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>modal</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ modal: true });</code></pre> +</dd> + + +<dt> + Get or set the <code>modal</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var modal = $( ".selector" ).dialog( "option", "modal" ); +//setter +$( ".selector" ).dialog( "option", "modal", true );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-position"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-position">position</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String, Array</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">'center'</dd> + + </dl> + </div> + <div class="option-description"> + <p>Specifies where the dialog should be displayed. Possible values: <br />1) a single string representing position within viewport: 'center', 'left', 'right', 'top', 'bottom'. <br />2) an array containing an <em>x,y</em> coordinate pair in pixel offset from left, top corner of viewport (e.g. [350,100]) <br />3) an array containing <em>x,y</em> position string values (e.g. ['right','top'] for top right corner).</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>position</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ position: 'top' });</code></pre> +</dd> + + +<dt> + Get or set the <code>position</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var position = $( ".selector" ).dialog( "option", "position" ); +//setter +$( ".selector" ).dialog( "option", "position", 'top' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-resizable"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-resizable">resizable</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">true</dd> + + </dl> + </div> + <div class="option-description"> + <p>If set to true, the dialog will be resizeable.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>resizable</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ resizable: false });</code></pre> +</dd> + + +<dt> + Get or set the <code>resizable</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var resizable = $( ".selector" ).dialog( "option", "resizable" ); +//setter +$( ".selector" ).dialog( "option", "resizable", false );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-show"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-show">show</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">null</dd> + + </dl> + </div> + <div class="option-description"> + <p>The effect to be used when the dialog is opened.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>show</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ show: 'slide' });</code></pre> +</dd> + + +<dt> + Get or set the <code>show</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var show = $( ".selector" ).dialog( "option", "show" ); +//setter +$( ".selector" ).dialog( "option", "show", 'slide' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-stack"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-stack">stack</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">true</dd> + + </dl> + </div> + <div class="option-description"> + <p>Specifies whether the dialog will stack on top of other dialogs. This will cause the dialog to move to the front of other dialogs when it gains focus.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>stack</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ stack: false });</code></pre> +</dd> + + +<dt> + Get or set the <code>stack</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var stack = $( ".selector" ).dialog( "option", "stack" ); +//setter +$( ".selector" ).dialog( "option", "stack", false );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-title"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-title">title</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">''</dd> + + </dl> + </div> + <div class="option-description"> + <p>Specifies the title of the dialog. The title can also be specified by the title attribute on the dialog source element.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>title</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ title: 'Dialog Title' });</code></pre> +</dd> + + +<dt> + Get or set the <code>title</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var title = $( ".selector" ).dialog( "option", "title" ); +//setter +$( ".selector" ).dialog( "option", "title", 'Dialog Title' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-width"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-width">width</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Number</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">300</dd> + + </dl> + </div> + <div class="option-description"> + <p>The width of the dialog, in pixels.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>width</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ width: 460 });</code></pre> +</dd> + + +<dt> + Get or set the <code>width</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var width = $( ".selector" ).dialog( "option", "width" ); +//setter +$( ".selector" ).dialog( "option", "width", 460 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-zIndex"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-zIndex">zIndex</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Integer</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">1000</dd> + + </dl> + </div> + <div class="option-description"> + <p>The starting z-index for the dialog.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a dialog with the <code>zIndex</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ zIndex: 3999 });</code></pre> +</dd> + + +<dt> + Get or set the <code>zIndex</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var zIndex = $( ".selector" ).dialog( "option", "zIndex" ); +//setter +$( ".selector" ).dialog( "option", "zIndex", 3999 );</code></pre> +</dd> + + </dl> + </div> +</li> + + </ul> + </div> + <div id="events"> + <h2 class="top-header">Events</h2> + <ul class="events-list"> + +<li class="event" id="event-beforeclose"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-beforeclose">beforeclose</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dialogbeforeclose</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered when a dialog attempts to close. If the beforeclose event handler (callback function) returns false, the close will be prevented.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>beforeclose</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ + beforeclose: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>beforeclose</code> event by type: <code>dialogbeforeclose</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dialogbeforeclose", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-open"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-open">open</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dialogopen</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered when dialog is opened.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>open</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ + open: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>open</code> event by type: <code>dialogopen</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dialogopen", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-focus"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-focus">focus</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dialogfocus</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered when the dialog gains focus.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>focus</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ + focus: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>focus</code> event by type: <code>dialogfocus</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dialogfocus", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-dragStart"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-dragStart">dragStart</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dialogdragstart</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered at the beginning of the dialog being dragged.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>dragStart</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ + dragStart: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>dragStart</code> event by type: <code>dialogdragstart</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dialogdragstart", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-drag"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-drag">drag</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dialogdrag</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered when the dialog is dragged.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>drag</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ + drag: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>drag</code> event by type: <code>dialogdrag</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dialogdrag", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-dragStop"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-dragStop">dragStop</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dialogdragstop</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered after the dialog has been dragged.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>dragStop</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ + dragStop: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>dragStop</code> event by type: <code>dialogdragstop</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dialogdragstop", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-resizeStart"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-resizeStart">resizeStart</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dialogresizestart</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered at the beginning of the dialog being resized.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>resizeStart</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ + resizeStart: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>resizeStart</code> event by type: <code>dialogresizestart</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dialogresizestart", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-resize"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-resize">resize</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dialogresize</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered when the dialog is resized. <a href="http://www.jsfiddle.net/Jp7TM/18/" class="external text" title="http://www.jsfiddle.net/Jp7TM/18/">demo</a></p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>resize</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ + resize: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>resize</code> event by type: <code>dialogresize</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dialogresize", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-resizeStop"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-resizeStop">resizeStop</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dialogresizestop</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered after the dialog has been resized.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>resizeStop</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ + resizeStop: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>resizeStop</code> event by type: <code>dialogresizestop</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dialogresizestop", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-close"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-close">close</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dialogclose</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered when the dialog is closed.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>close</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).dialog({ + close: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>close</code> event by type: <code>dialogclose</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dialogclose", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + </ul> + </div> + <div id="methods"> + <h2 class="top-header">Methods</h2> + <ul class="methods-list"> + +<li class="method" id="method-destroy"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-destroy">destroy</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.dialog( "destroy" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Remove the dialog functionality completely. This will return the element back to its pre-init state.</p> + </div> +</li> + + +<li class="method" id="method-disable"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-disable">disable</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.dialog( "disable" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Disable the dialog.</p> + </div> +</li> + + +<li class="method" id="method-enable"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-enable">enable</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.dialog( "enable" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Enable the dialog.</p> + </div> +</li> + + +<li class="method" id="method-option"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-option">option</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.dialog( "option" + +, optionName + +, <span class="optional">[</span>value<span class="optional">] </span> + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Get or set any dialog option. If no value is specified, will act as a getter.</p> + </div> +</li> + + +<li class="method" id="method-option"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-option">option</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.dialog( "option" + +, options + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Set multiple dialog options at once by providing an options object.</p> + </div> +</li> + + +<li class="method" id="method-widget"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-widget">widget</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.dialog( "widget" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Returns the .ui-dialog element.</p> + </div> +</li> + + +<li class="method" id="method-close"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-close">close</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.dialog( "close" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Close the dialog.</p> + </div> +</li> + + +<li class="method" id="method-isOpen"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-isOpen">isOpen</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.dialog( "isOpen" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Returns true if the dialog is currently open.</p> + </div> +</li> + + +<li class="method" id="method-moveToTop"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-moveToTop">moveToTop</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.dialog( "moveToTop" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Move the dialog to the top of the dialogs stack.</p> + </div> +</li> + + +<li class="method" id="method-open"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-open">open</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.dialog( "open" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Open the dialog.</p> + </div> +</li> + + </ul> + </div> + <div id="theming"> + <h2 class="top-header">Theming</h2> + <p>The jQuery UI Dialog plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +</p> + <p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.dialog.css stylesheet that can be modified. These classes are highlighed in bold below. +</p> + + <h3>Sample markup with jQuery UI CSS Framework classes</h3> + <div class="<strong>ui-dialog</strong> ui-widget ui-widget-content ui-corner-all ui-draggable ui-resizable"><br /> + <div class="<strong>ui-dialog-titlebar</strong> ui-widget-header ui-corner-all ui-helper-clearfix"><br /> + <span id="<strong>ui-dialog-title-dialog</strong>" class="ui-dialog-title">Dialog title</span><br /> + <a class="<strong>ui-dialog-titlebar-close</strong> ui-corner-all" href="#"><span class="ui-icon ui-icon-closethick">close</span></a><br /> + </div><br /> + <div style="height: 200px; min-height: 109px; width: auto;" class="<strong>ui-dialog-content</strong> ui-widget-content" id="dialog"><br /> + <p>Dialog content goes here.</p><br /> + </div><br /> +</div><br /> + <p class="theme-note"> + <strong> + Note: This is a sample of markup generated by the dialog plugin, not markup you should use to create a dialog. The only markup needed for that is <div></div>. + </strong> + </p> + + </div> +</div> + +</p><!-- +Pre-expand include size: 63516 bytes +Post-expand include size: 106924 bytes +Template argument size: 59239 bytes +Maximum: 2097152 bytes +--> + +<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3775-1!1!0!!en!2 and timestamp 20100520115502 --> Propchange: ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/dialog.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/dialog.html ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/dialog.html ------------------------------------------------------------------------------ svn:mime-type = text/html Added: ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/draggable.html URL: http://svn.apache.org/viewvc/ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/draggable.html?rev=956651&view=auto ============================================================================== --- ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/draggable.html (added) +++ ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/draggable.html Mon Jun 21 17:45:18 2010 @@ -0,0 +1,1536 @@ + +<ul class="UIAPIPlugin-toc"> +<li><a href="#overview">Overview</a></li> +<li><a href="#options">Options</a></li> +<li><a href="#events">Events</a></li> +<li><a href="#methods">Methods</a></li> +<li><a href="#theming">Theming</a></li> +</ul> +<div class="UIAPIPlugin"> + <h1>jQuery UI Draggable</h1> + <div id="overview"> + <h2 class="top-header">Overview</h2> + <div id="overview-main"> + <p>The jQuery UI Draggable plugin makes selected elements draggable by mouse.</p> +<p>Draggable elements gets a class of <code>ui-draggable</code>. During drag the element also gets a class of <code>ui-draggable-dragging</code>. If you want not just drag, but drag-and-drop, see the jQuery UI Droppable plugin, which provides a drop target for draggables.</p> +<p>All callbacks (start, stop, drag) receive two arguments: The original browser event and a prepared ui object, view below for a documentation of this object (if you name your second argument 'ui'):</p> +<ul> +<li><b>ui.helper</b> - the jQuery object representing the helper that's being dragged</li> +<li><b>ui.position</b> - current position of the helper as { top, left } object, relative to the offset element</li> +<li><b>ui.offset</b> - current absolute position of the helper as { top, left } object, relative to page</li> +</ul> +<p><br /> +</p> +<p>To manipulate the position of a draggable during drag, you can either <a href="http://jsbin.com/etako/edit" class="external text" title="http://jsbin.com/etako/edit">use a wrapper as the draggable helper</a> and position the wrapped element with absolute positioning, or you can correct internal values like so: <code>$(this).data('draggable').offset.click.top -= x</code>.</p> + </div> + <div id="overview-dependencies"> + <h3>Dependencies</h3> + <ul> +<li>UI Core</li> +</ul> + </div> + <div id="overview-example"> + <h3>Example</h3> + <div id="overview-example" class="example"> +<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul> +<p><div id="demo" class="tabs-container" rel="170"> +Initialize a draggable with default options.<br /> +</p> +<pre>$("#draggable").draggable(); +</pre> +<p></div><div id="source" class="tabs-container"> +</p> +<pre><!DOCTYPE html> +<html> +<head> + <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> + <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> + <style type="text/css"> + #draggable { width: 100px; height: 70px; background: silver; } + </style> + <script> + $(document).ready(function() { + $("#draggable").draggable(); + }); + </script> +</head> +<body style="font-size:62.5%;"> + +<div id="draggable">Drag me</div> + +</body> +</html> +</pre> +<p></div> +</p><p></div> + </div> + </div> + <div id="options"> + <h2 class="top-header">Options</h2> + <ul class="options-list"> + +<li class="option" id="option-disabled"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-disabled">disabled</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>Disables (true) or enables (false) the draggable. Can be set when initialising (first creating) the draggable.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>disabled</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ disabled: true });</code></pre> +</dd> + + +<dt> + Get or set the <code>disabled</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var disabled = $( ".selector" ).draggable( "option", "disabled" ); +//setter +$( ".selector" ).draggable( "option", "disabled", true );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-addClasses"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-addClasses">addClasses</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">true</dd> + + </dl> + </div> + <div class="option-description"> + <p>If set to false, will prevent the <code>ui-draggable</code> class from being added. This may be desired as a performance optimization when calling <code>.draggable()</code> init on many hundreds of elements.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>addClasses</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ addClasses: false });</code></pre> +</dd> + + +<dt> + Get or set the <code>addClasses</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var addClasses = $( ".selector" ).draggable( "option", "addClasses" ); +//setter +$( ".selector" ).draggable( "option", "addClasses", false );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-appendTo"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-appendTo">appendTo</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Element, Selector</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">'parent'</dd> + + </dl> + </div> + <div class="option-description"> + <p>The element passed to or selected by the <code>appendTo</code> option will be used as the draggable helper's container during dragging. By default, the helper is appended to the same container as the draggable.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>appendTo</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ appendTo: 'body' });</code></pre> +</dd> + + +<dt> + Get or set the <code>appendTo</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var appendTo = $( ".selector" ).draggable( "option", "appendTo" ); +//setter +$( ".selector" ).draggable( "option", "appendTo", 'body' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-axis"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-axis">axis</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>Constrains dragging to either the horizontal (x) or vertical (y) axis. Possible values: 'x', 'y'.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>axis</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ axis: 'x' });</code></pre> +</dd> + + +<dt> + Get or set the <code>axis</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var axis = $( ".selector" ).draggable( "option", "axis" ); +//setter +$( ".selector" ).draggable( "option", "axis", 'x' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-cancel"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-cancel">cancel</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Selector</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">':input,option'</dd> + + </dl> + </div> + <div class="option-description"> + <p>Prevents dragging from starting on specified elements.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>cancel</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ cancel: 'button' });</code></pre> +</dd> + + +<dt> + Get or set the <code>cancel</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var cancel = $( ".selector" ).draggable( "option", "cancel" ); +//setter +$( ".selector" ).draggable( "option", "cancel", 'button' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-connectToSortable"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-connectToSortable">connectToSortable</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Selector</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>Allows the draggable to be dropped onto the specified sortables. If this option is used (<code>helper</code> must be set to 'clone' in order to work flawlessly), a draggable can be dropped onto a sortable list and then becomes part of it. +</p><p>Note: Specifying this option as an array of selectors has been removed.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>connectToSortable</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ connectToSortable: 'ul#myList' });</code></pre> +</dd> + + +<dt> + Get or set the <code>connectToSortable</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var connectToSortable = $( ".selector" ).draggable( "option", "connectToSortable" ); +//setter +$( ".selector" ).draggable( "option", "connectToSortable", 'ul#myList' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-containment"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-containment">containment</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Selector, Element, String, Array</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>Constrains dragging to within the bounds of the specified element or region. Possible string values: 'parent', 'document', 'window', [x1, y1, x2, y2].</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>containment</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ containment: 'parent' });</code></pre> +</dd> + + +<dt> + Get or set the <code>containment</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var containment = $( ".selector" ).draggable( "option", "containment" ); +//setter +$( ".selector" ).draggable( "option", "containment", 'parent' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-cursor"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-cursor">cursor</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">'auto'</dd> + + </dl> + </div> + <div class="option-description"> + <p>The css cursor during the drag operation.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>cursor</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ cursor: 'crosshair' });</code></pre> +</dd> + + +<dt> + Get or set the <code>cursor</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var cursor = $( ".selector" ).draggable( "option", "cursor" ); +//setter +$( ".selector" ).draggable( "option", "cursor", 'crosshair' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-cursorAt"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-cursorAt">cursorAt</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Object</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>Moves the dragging helper so the cursor always appears to drag from the same position. Coordinates can be given as a hash using a combination of one or two keys: <code>{ top, left, right, bottom }</code>.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>cursorAt</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ cursorAt: { left: 5 } });</code></pre> +</dd> + + +<dt> + Get or set the <code>cursorAt</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var cursorAt = $( ".selector" ).draggable( "option", "cursorAt" ); +//setter +$( ".selector" ).draggable( "option", "cursorAt", { left: 5 } );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-delay"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-delay">delay</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Integer</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">0</dd> + + </dl> + </div> + <div class="option-description"> + <p>Time in milliseconds after mousedown until dragging should start. This option can be used to prevent unwanted drags when clicking on an element.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>delay</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ delay: 500 });</code></pre> +</dd> + + +<dt> + Get or set the <code>delay</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var delay = $( ".selector" ).draggable( "option", "delay" ); +//setter +$( ".selector" ).draggable( "option", "delay", 500 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-distance"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-distance">distance</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Integer</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">1</dd> + + </dl> + </div> + <div class="option-description"> + <p>Distance in pixels after mousedown the mouse must move before dragging should start. This option can be used to prevent unwanted drags when clicking on an element.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>distance</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ distance: 30 });</code></pre> +</dd> + + +<dt> + Get or set the <code>distance</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var distance = $( ".selector" ).draggable( "option", "distance" ); +//setter +$( ".selector" ).draggable( "option", "distance", 30 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-grid"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-grid">grid</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Array</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>Snaps the dragging helper to a grid, every x and y pixels. Array values: [x, y]</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>grid</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ grid: [50, 20] });</code></pre> +</dd> + + +<dt> + Get or set the <code>grid</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var grid = $( ".selector" ).draggable( "option", "grid" ); +//setter +$( ".selector" ).draggable( "option", "grid", [50, 20] );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-handle"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-handle">handle</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Element, Selector</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>If specified, restricts drag start click to the specified element(s).</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>handle</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ handle: 'h2' });</code></pre> +</dd> + + +<dt> + Get or set the <code>handle</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var handle = $( ".selector" ).draggable( "option", "handle" ); +//setter +$( ".selector" ).draggable( "option", "handle", 'h2' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-helper"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-helper">helper</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String, Function</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">'original'</dd> + + </dl> + </div> + <div class="option-description"> + <p>Allows for a helper element to be used for dragging display. Possible values: 'original', 'clone', Function. If a function is specified, it must return a DOMElement.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>helper</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ helper: 'clone' });</code></pre> +</dd> + + +<dt> + Get or set the <code>helper</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var helper = $( ".selector" ).draggable( "option", "helper" ); +//setter +$( ".selector" ).draggable( "option", "helper", 'clone' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-iframeFix"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-iframeFix">iframeFix</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean, Selector</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>Prevent iframes from capturing the mousemove events during a drag. Useful in combination with cursorAt, or in any case, if the mouse cursor is not over the helper. If set to true, transparent overlays will be placed over all iframes on the page. If a selector is supplied, the matched iframes will have an overlay placed over them.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>iframeFix</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ iframeFix: true });</code></pre> +</dd> + + +<dt> + Get or set the <code>iframeFix</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var iframeFix = $( ".selector" ).draggable( "option", "iframeFix" ); +//setter +$( ".selector" ).draggable( "option", "iframeFix", true );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-opacity"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-opacity">opacity</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Float</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>Opacity for the helper while being dragged.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>opacity</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ opacity: 0.35 });</code></pre> +</dd> + + +<dt> + Get or set the <code>opacity</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var opacity = $( ".selector" ).draggable( "option", "opacity" ); +//setter +$( ".selector" ).draggable( "option", "opacity", 0.35 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-refreshPositions"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-refreshPositions">refreshPositions</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>If set to true, all droppable positions are calculated on every mousemove. Caution: This solves issues on highly dynamic pages, but dramatically decreases performance.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>refreshPositions</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ refreshPositions: true });</code></pre> +</dd> + + +<dt> + Get or set the <code>refreshPositions</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var refreshPositions = $( ".selector" ).draggable( "option", "refreshPositions" ); +//setter +$( ".selector" ).draggable( "option", "refreshPositions", true );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-revert"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-revert">revert</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean, String</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>If set to true, the element will return to its start position when dragging stops. Possible string values: 'valid', 'invalid'. If set to invalid, revert will only occur if the draggable has not been dropped on a droppable. For valid, it's the other way around.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>revert</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ revert: true });</code></pre> +</dd> + + +<dt> + Get or set the <code>revert</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var revert = $( ".selector" ).draggable( "option", "revert" ); +//setter +$( ".selector" ).draggable( "option", "revert", true );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-revertDuration"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-revertDuration">revertDuration</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Integer</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">500</dd> + + </dl> + </div> + <div class="option-description"> + <p>The duration of the revert animation, in milliseconds. Ignored if revert is false.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>revertDuration</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ revertDuration: 1000 });</code></pre> +</dd> + + +<dt> + Get or set the <code>revertDuration</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var revertDuration = $( ".selector" ).draggable( "option", "revertDuration" ); +//setter +$( ".selector" ).draggable( "option", "revertDuration", 1000 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-scope"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-scope">scope</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">'default'</dd> + + </dl> + </div> + <div class="option-description"> + <p>Used to group sets of draggable and droppable items, in addition to droppable's accept option. A draggable with the same scope value as a droppable will be accepted by the droppable.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>scope</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ scope: 'tasks' });</code></pre> +</dd> + + +<dt> + Get or set the <code>scope</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var scope = $( ".selector" ).draggable( "option", "scope" ); +//setter +$( ".selector" ).draggable( "option", "scope", 'tasks' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-scroll"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-scroll">scroll</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">true</dd> + + </dl> + </div> + <div class="option-description"> + <p>If set to true, container auto-scrolls while dragging.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>scroll</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ scroll: false });</code></pre> +</dd> + + +<dt> + Get or set the <code>scroll</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var scroll = $( ".selector" ).draggable( "option", "scroll" ); +//setter +$( ".selector" ).draggable( "option", "scroll", false );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-scrollSensitivity"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-scrollSensitivity">scrollSensitivity</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Integer</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">20</dd> + + </dl> + </div> + <div class="option-description"> + <p>Distance in pixels from the edge of the viewport after which the viewport should scroll. Distance is relative to pointer, not the draggable.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>scrollSensitivity</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ scrollSensitivity: 40 });</code></pre> +</dd> + + +<dt> + Get or set the <code>scrollSensitivity</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var scrollSensitivity = $( ".selector" ).draggable( "option", "scrollSensitivity" ); +//setter +$( ".selector" ).draggable( "option", "scrollSensitivity", 40 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-scrollSpeed"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-scrollSpeed">scrollSpeed</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Integer</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">20</dd> + + </dl> + </div> + <div class="option-description"> + <p>The speed at which the window should scroll once the mouse pointer gets within the <code>scrollSensitivity</code> distance.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>scrollSpeed</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ scrollSpeed: 40 });</code></pre> +</dd> + + +<dt> + Get or set the <code>scrollSpeed</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var scrollSpeed = $( ".selector" ).draggable( "option", "scrollSpeed" ); +//setter +$( ".selector" ).draggable( "option", "scrollSpeed", 40 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-snap"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-snap">snap</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Boolean, Selector</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>If set to a selector or to true (equivalent to '.ui-draggable'), the draggable will snap to the edges of the selected elements when near an edge of the element.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>snap</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ snap: true });</code></pre> +</dd> + + +<dt> + Get or set the <code>snap</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var snap = $( ".selector" ).draggable( "option", "snap" ); +//setter +$( ".selector" ).draggable( "option", "snap", true );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-snapMode"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-snapMode">snapMode</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">String</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">'both'</dd> + + </dl> + </div> + <div class="option-description"> + <p>Determines which edges of snap elements the draggable will snap to. Ignored if snap is false. Possible values: 'inner', 'outer', 'both'</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>snapMode</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ snapMode: 'outer' });</code></pre> +</dd> + + +<dt> + Get or set the <code>snapMode</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var snapMode = $( ".selector" ).draggable( "option", "snapMode" ); +//setter +$( ".selector" ).draggable( "option", "snapMode", 'outer' );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-snapTolerance"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-snapTolerance">snapTolerance</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Integer</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">20</dd> + + </dl> + </div> + <div class="option-description"> + <p>The distance in pixels from the snap element edges at which snapping should occur. Ignored if snap is false.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>snapTolerance</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ snapTolerance: 40 });</code></pre> +</dd> + + +<dt> + Get or set the <code>snapTolerance</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var snapTolerance = $( ".selector" ).draggable( "option", "snapTolerance" ); +//setter +$( ".selector" ).draggable( "option", "snapTolerance", 40 );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-stack"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-stack">stack</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Selector</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>Controls the z-Index of the set of elements that match the selector, always brings to front the dragged item. Very useful in things like window managers.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>stack</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ stack: ".products" });</code></pre> +</dd> + + +<dt> + Get or set the <code>stack</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var stack = $( ".selector" ).draggable( "option", "stack" ); +//setter +$( ".selector" ).draggable( "option", "stack", ".products" );</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="option" id="option-zIndex"> + <div class="option-header"> + <h3 class="option-name"><a href="#option-zIndex">zIndex</a></h3> + <dl> + <dt class="option-type-label">Type:</dt> + <dd class="option-type">Integer</dd> + + <dt class="option-default-label">Default:</dt> + <dd class="option-default">false</dd> + + </dl> + </div> + <div class="option-description"> + <p>z-index for the helper while being dragged.</p> + </div> + <div class="option-examples"> + <h4>Code examples</h4> + <dl class="option-examples-list"> + +<dt> + Initialize a draggable with the <code>zIndex</code> option specified. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ zIndex: 2700 });</code></pre> +</dd> + + +<dt> + Get or set the <code>zIndex</code> option, after init. +</dt> +<dd> +<pre><code>//getter +var zIndex = $( ".selector" ).draggable( "option", "zIndex" ); +//setter +$( ".selector" ).draggable( "option", "zIndex", 2700 );</code></pre> +</dd> + + </dl> + </div> +</li> + + </ul> + </div> + <div id="events"> + <h2 class="top-header">Events</h2> + <ul class="events-list"> + +<li class="event" id="event-start"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-start">start</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dragstart</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered when dragging starts.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>start</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ + start: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>start</code> event by type: <code>dragstart</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dragstart", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-drag"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-drag">drag</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">drag</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered when the mouse is moved during the dragging.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>drag</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ + drag: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>drag</code> event by type: <code>drag</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "drag", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + +<li class="event" id="event-stop"> + <div class="event-header"> + <h3 class="event-name"><a href="#event-stop">stop</a></h3> + <dl> + <dt class="event-type-label">Type:</dt> + <dd class="event-type">dragstop</dd> + </dl> + </div> + <div class="event-description"> + <p>This event is triggered when dragging stops.</p> + </div> + <div class="event-examples"> + <h4>Code examples</h4> + <dl class="event-examples-list"> + +<dt> + Supply a callback function to handle the <code>stop</code> event as an init option. +</dt> +<dd> +<pre><code>$( ".selector" ).draggable({ + stop: function(event, ui) { ... } +});</code></pre> +</dd> + + +<dt> + Bind to the <code>stop</code> event by type: <code>dragstop</code>. +</dt> +<dd> +<pre><code>$( ".selector" ).bind( "dragstop", function(event, ui) { + ... +});</code></pre> +</dd> + + </dl> + </div> +</li> + + </ul> + </div> + <div id="methods"> + <h2 class="top-header">Methods</h2> + <ul class="methods-list"> + +<li class="method" id="method-destroy"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-destroy">destroy</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.draggable( "destroy" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Remove the draggable functionality completely. This will return the element back to its pre-init state.</p> + </div> +</li> + + +<li class="method" id="method-disable"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-disable">disable</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.draggable( "disable" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Disable the draggable.</p> + </div> +</li> + + +<li class="method" id="method-enable"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-enable">enable</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.draggable( "enable" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Enable the draggable.</p> + </div> +</li> + + +<li class="method" id="method-option"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-option">option</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.draggable( "option" + +, optionName + +, <span class="optional">[</span>value<span class="optional">] </span> + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Get or set any draggable option. If no value is specified, will act as a getter.</p> + </div> +</li> + + +<li class="method" id="method-option"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-option">option</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.draggable( "option" + +, options + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Set multiple draggable options at once by providing an options object.</p> + </div> +</li> + + +<li class="method" id="method-widget"> + <div class="method-header"> + <h3 class="method-name"><a href="#method-widget">widget</a></h3> + <dl> + <dt class="method-signature-label">Signature:</dt> + <dd class="method-signature">.draggable( "widget" + + + + + + + +)</dd> + </dl> + </div> + <div class="method-description"> + <p>Returns the .ui-draggable element.</p> + </div> +</li> + + + </ul> + </div> + <div id="theming"> + <h2 class="top-header">Theming</h2> + <p>The jQuery UI Draggable plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain. +</p> + <p>If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.draggable.css stylesheet that can be modified. These classes are highlighed in bold below. +</p> + + <h3>Sample markup with jQuery UI CSS Framework classes</h3> + <div class="<strong>ui-draggable</strong>"></div> + <p class="theme-note"> + <strong> + Note: This is a sample of markup generated by the draggable plugin, not markup you should use to create a draggable. The only markup needed for that is <div></div>. + </strong> + </p> + + </div> +</div> + +</p><!-- +Pre-expand include size: 59871 bytes +Post-expand include size: 104871 bytes +Template argument size: 58170 bytes +Maximum: 2097152 bytes +--> + +<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3768-1!1!0!!en!2 and timestamp 20100520115455 --> Propchange: ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/draggable.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/draggable.html ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/branches/jquery/framework/images/webapp/images/jquery/ui/development-bundle/docs/draggable.html ------------------------------------------------------------------------------ svn:mime-type = text/html |
Free forum by Nabble | Edit this page |