mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 06:53:15 +00:00
V 3.5 RC 1
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,109 @@
|
||||
|
||||
<ul class="UIAPIPlugin-toc">
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#options">Arguments</a></li>
|
||||
</ul>
|
||||
<div class="UIAPIPlugin">
|
||||
<h1>jQuery UI addClass</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/addClass?section=1" title="Edit section: addClass( class, [duration] )">edit</a>]</div><a name="addClass.28_class.2C_.5Bduration.5D_.29"></a><h3>addClass( class, <span class="optional">[</span>duration<span class="optional">]</span> )</h3>
|
||||
<p>Adds the specified class to each of the set of matched elements with an optional transition between the states.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>Effects 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="100">
|
||||
Adds the class 'selected' to the matched elements with a one second transition.<br />
|
||||
</p>
|
||||
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$(this).<strong class="selflink">addClass</strong>("selected", 1000);
|
||||
});
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
|
||||
<style type="text/css">
|
||||
p { cursor: pointer; font-size: 1.2em; }
|
||||
.selected { color:red; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$(this).<strong class="selflink">addClass</strong>("selected", 1000);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
<p>Click me to add a 'selected' class.</p>
|
||||
<p>Click me to add a 'selected' class.</p>
|
||||
<p>Click me to add a 'selected' class.</p>
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="options">
|
||||
<h2 class="top-header">Arguments</h2>
|
||||
<ul class="options-list">
|
||||
|
||||
<li class="option" id="option-class">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-class">class</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>One CSS class to add to the elements.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-duration">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-duration">duration</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String, Number</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 5228 bytes
|
||||
Post-expand include size: 6863 bytes
|
||||
Template argument size: 4285 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2606-1!1!0!!en!2 and timestamp 20110413154136 -->
|
@@ -0,0 +1,78 @@
|
||||
<p>The jQuery UI effects core extends the <a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a> function to be able to animate colors as well. It's heavily used by the class transition feature and it's able to color animate the following properties:
|
||||
</p>
|
||||
<ul><li> <b>backgroundColor</b>
|
||||
</li><li> <b>borderBottomColor</b>
|
||||
</li><li> <b>borderLeftColor</b>
|
||||
</li><li> <b>borderRightColor</b>
|
||||
</li><li> <b>borderTopColor</b>
|
||||
</li><li> <b>color</b>
|
||||
</li><li> <b>outlineColor</b>
|
||||
</li></ul>
|
||||
<p>with one of the following combinations:
|
||||
</p>
|
||||
<ul><li> <b>hex (#FF0000)</b>
|
||||
</li><li> <b>rgb (rgb(255,255,255))</b>
|
||||
</li><li> <b>names ("black")</b>
|
||||
</li></ul>
|
||||
<p><br />
|
||||
</p><p><div class="options list"><table class="options examples" cellspacing="0"><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody>
|
||||
</table><b class="options">Example:</b><table class="options examples" cellspacing="0"><thead><tr><th>Name</th><th>Type</th></tr></thead><tbody>
|
||||
<div class="example">
|
||||
<ul><li><a href="#demo"><span>Demo</span></a></li><li><a href="#source"><span>View Source</span></a></li></ul>
|
||||
<div id="demo" class="tabs-container" rel="125">
|
||||
A simple color animation.<br />
|
||||
</p>
|
||||
<pre>$(".block").<a href="http://docs.jquery.com/Events/toggle" title="Events/toggle">toggle</a>(function() {
|
||||
$(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: "black" }, 1000);
|
||||
},function() {
|
||||
$(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: "#68BFEF" }, 500);
|
||||
});
|
||||
|
||||
</pre>
|
||||
<p></div><div id="source" class="tabs-container">
|
||||
</p>
|
||||
<pre><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"<a href="http://www.w3.org/TR/html4/loose.dtd" class="external free" title="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>">
|
||||
<html>
|
||||
<head>
|
||||
<script src="<a href="http://code.jquery.com/jquery-latest.js" class="external free" title="http://code.jquery.com/jquery-latest.js">http://code.jquery.com/jquery-latest.js</a>"></script>
|
||||
|
||||
<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(){
|
||||
$(".block").<a href="http://docs.jquery.com/Events/toggle" title="Events/toggle">toggle</a>(function() {
|
||||
$(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: "black" }, 1000);
|
||||
},function() {
|
||||
$(this).<a href="http://docs.jquery.com/Effects/animate" title="Effects/animate">animate</a>({ backgroundColor: "#68BFEF" }, 500);
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.block {
|
||||
color: white;
|
||||
background-color: #68BFEF;
|
||||
width: 150px;
|
||||
height: 70px;
|
||||
margin: 10px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="block"> Click me</div>
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
</p><p></tbody></table></div>
|
||||
</p><!--
|
||||
Pre-expand include size: 3730 bytes
|
||||
Post-expand include size: 5382 bytes
|
||||
Template argument size: 3450 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3094-1!1!0!!en!2 and timestamp 20110413160320 -->
|
@@ -0,0 +1,875 @@
|
||||
|
||||
<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 Autocomplete</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<p>Autocomplete, when added to an input field, enables users to quickly find and select from a pre-populated list of values as they type, leveraging searching and filtering.</p>
|
||||
<p>By giving an Autocomplete field focus or entering something into it, the plugin starts searching for entries that match and displays a list of values to choose from. By entering more characters, the user can filter down the list to better matches.</p>
|
||||
<p>This can be used to enter previous selected values, for example you could use Autocomplete for entering tags, to complete an address, you could enter a city name and get the zip code, or maybe enter email addresses from an address book.</p>
|
||||
<p>You can pull data in from a local and/or a remote source: Local is good for small data sets (like an address book with 50 entries), remote is necessary for big data sets, like a database with hundreds or millions of entries to select from.</p>
|
||||
<p>Autocomplete can be customized to work with various data sources, by just specifying the source option. A data source can be:</p>
|
||||
<ul>
|
||||
<li>an Array with local data</li>
|
||||
<li>a String, specifying a URL</li>
|
||||
<li>a Callback</li>
|
||||
</ul>
|
||||
<p>The local data can be a simple Array of Strings, or it contains Objects for each item in the array, with either a label or value property or both. The label property is displayed in the suggestion menu. The value will be inserted into the input element after the user selected something from the menu. If just one property is specified, it will be used for both, eg. if you provide only value-properties, the value will also be used as the label.</p>
|
||||
<p>When a String is used, the Autocomplete plugin expects that string to point to a URL resource that will return JSON data. It can be on the same host or on a different one (must provide JSONP). The request parameter "term" gets added to that URL. The data itself can be in the same format as the local data described above.</p>
|
||||
<p>The third variation, the callback, provides the most flexibility, and can be used to connect any data source to Autocomplete. The callback gets two arguments:</p>
|
||||
<ul>
|
||||
<li>A request object, with a single property called "term", which refers to the value currently in the text input. For example, when the user entered "new yo" in a city field, the Autocomplete term will equal "new yo".</li>
|
||||
<li>A response callback, which expects a single argument to contain the data to suggest to the user. This data should be filtered based on the provided term, and can be in any of the formats described above for simple local data (String-Array or Object-Array with label/value/both properties). It's important when providing a custom source callback to handle errors during the request. You must always call the response callback even if you encounter an error. This ensures that the widget always has the correct state.</li>
|
||||
</ul>
|
||||
<p>The label is always treated as text, if you want the label to be treated as html you can use <a href="https://github.com/scottgonzalez/jquery-ui-extensions/blob/master/autocomplete/jquery.ui.autocomplete.html.js" class="external text" title="https://github.com/scottgonzalez/jquery-ui-extensions/blob/master/autocomplete/jquery.ui.autocomplete.html.js">Scott González' html extension</a>. The demos all focus on different variations of the source-option - look for the one that matches your use case, and take a look at the code.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>UI Core</li>
|
||||
<li>UI Widget</li>
|
||||
<li>UI Position</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 Autocomplete.<br />
|
||||
</p>
|
||||
<pre>$("input#autocomplete").autocomplete({
|
||||
source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"]
|
||||
});
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("input#autocomplete").autocomplete({
|
||||
source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"]
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<input id="autocomplete" />
|
||||
|
||||
</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 autocomplete. Can be set when initialising (first creating) the autocomplete.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a autocomplete with the <code>disabled</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({ disabled: true });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>disabled</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var disabled = $( ".selector" ).autocomplete( "option", "disabled" );
|
||||
//setter
|
||||
$( ".selector" ).autocomplete( "option", "disabled", true );</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">Selector</dd>
|
||||
|
||||
<dt class="option-default-label">Default:</dt>
|
||||
<dd class="option-default">"body"</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Which element the menu should be appended to.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a autocomplete with the <code>appendTo</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({ appendTo: "#someElem" });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>appendTo</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var appendTo = $( ".selector" ).autocomplete( "option", "appendTo" );
|
||||
//setter
|
||||
$( ".selector" ).autocomplete( "option", "appendTo", "#someElem" );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-autoFocus">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-autoFocus">autoFocus</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 first item will be automatically focused.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a autocomplete with the <code>autoFocus</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({ autoFocus: true });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>autoFocus</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var autoFocus = $( ".selector" ).autocomplete( "option", "autoFocus" );
|
||||
//setter
|
||||
$( ".selector" ).autocomplete( "option", "autoFocus", true );</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">300</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The delay in milliseconds the Autocomplete waits after a keystroke to activate itself. A zero-delay makes sense for local data (more responsive), but can produce a lot of load for remote data, while being less responsive.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a autocomplete with the <code>delay</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({ delay: 0 });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>delay</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var delay = $( ".selector" ).autocomplete( "option", "delay" );
|
||||
//setter
|
||||
$( ".selector" ).autocomplete( "option", "delay", 0 );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-minLength">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-minLength">minLength</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>The minimum number of characters a user has to type before the Autocomplete activates. Zero is useful for local data with just a few items. Should be increased when there are a lot of items, where a single character would match a few thousand items.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a autocomplete with the <code>minLength</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({ minLength: 0 });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>minLength</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var minLength = $( ".selector" ).autocomplete( "option", "minLength" );
|
||||
//setter
|
||||
$( ".selector" ).autocomplete( "option", "minLength", 0 );</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">Object</dd>
|
||||
|
||||
<dt class="option-default-label">Default:</dt>
|
||||
<dd class="option-default">{ my: "left top", at: "left bottom", collision: "none" }</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Identifies the position of the Autocomplete widget in relation to the associated input element. The "of" option defaults to the input element, but you can specify another element to position against. You can refer to the <a href="http://docs.jquery.com/UI/Position" class="external text" title="http://docs.jquery.com/UI/Position">jQuery UI Position</a> utility for more details about the various options.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a autocomplete with the <code>position</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({ position: { my : "right top", at: "right bottom" } });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>position</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var position = $( ".selector" ).autocomplete( "option", "position" );
|
||||
//setter
|
||||
$( ".selector" ).autocomplete( "option", "position", { my : "right top", at: "right bottom" } );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-source">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-source">source</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String, Array, Callback</dd>
|
||||
|
||||
<dt class="option-default-label">Default:</dt>
|
||||
<dd class="option-default">none, must be specified</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Defines the data to use, must be specified. See Overview section for more details, and look at the various demos.
|
||||
</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a autocomplete with the <code>source</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({ source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"] });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>source</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var source = $( ".selector" ).autocomplete( "option", "source" );
|
||||
//setter
|
||||
$( ".selector" ).autocomplete( "option", "source", ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"] );</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-create">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-create">create</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">autocompletecreate</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when autocomplete is created.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>create</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({
|
||||
create: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>create</code> event by type: <code>autocompletecreate</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "autocompletecreate", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-search">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-search">search</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">autocompletesearch</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>Before a request (source-option) is started, after minLength and delay are met. Can be canceled (return false), then no request will be started and no items suggested.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>search</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({
|
||||
search: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>search</code> event by type: <code>autocompletesearch</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "autocompletesearch", 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">autocompleteopen</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>Triggered when the suggestion menu 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" ).autocomplete({
|
||||
open: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>open</code> event by type: <code>autocompleteopen</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "autocompleteopen", 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">autocompletefocus</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>Before focus is moved to an item (not selecting), ui.item refers to the focused item. The default action of focus is to replace the text field's value with the value of the focused item, though only if the focus event was triggered by a keyboard interaction. Canceling this event prevents the value from being updated, but does not prevent the menu item from being focused.</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" ).autocomplete({
|
||||
focus: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>focus</code> event by type: <code>autocompletefocus</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "autocompletefocus", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-select">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-select">select</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">autocompleteselect</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>Triggered when an item is selected from the menu; ui.item refers to the selected item. The default action of select is to replace the text field's value with the value of the selected item. Canceling this event prevents the value from being updated, but does not prevent the menu from closing.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>select</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({
|
||||
select: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>select</code> event by type: <code>autocompleteselect</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "autocompleteselect", 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">autocompleteclose</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>When the list is hidden - doesn't have to occur together with a change.</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" ).autocomplete({
|
||||
close: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>close</code> event by type: <code>autocompleteclose</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "autocompleteclose", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-change">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-change">change</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">autocompletechange</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>After an item was selected; ui.item refers to the selected item. Always triggered after the close event.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>change</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).autocomplete({
|
||||
change: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>change</code> event by type: <code>autocompletechange</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "autocompletechange", 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">.autocomplete( "destroy"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Remove the autocomplete 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">.autocomplete( "disable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Disable the autocomplete.</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">.autocomplete( "enable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Enable the autocomplete.</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">.autocomplete( "option"
|
||||
|
||||
, optionName
|
||||
|
||||
, <span class="optional">[</span>value<span class="optional">] </span>
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Get or set any autocomplete 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">.autocomplete( "option"
|
||||
|
||||
, options
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Set multiple autocomplete 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">.autocomplete( "widget"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Returns the .ui-autocomplete element.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="method" id="method-search">
|
||||
<div class="method-header">
|
||||
<h3 class="method-name"><a href="#method-search">search</a></h3>
|
||||
<dl>
|
||||
<dt class="method-signature-label">Signature:</dt>
|
||||
<dd class="method-signature">.autocomplete( "search"
|
||||
|
||||
, <span class="optional">[</span>value<span class="optional">] </span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Triggers a search event, which, when data is available, then will display the suggestions; can be used by a selectbox-like button to open the suggestions when clicked. If no value argument is specified, the current input's value is used. Can be called with an empty string and minLength: 0 to display all items.</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">.autocomplete( "close"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Close the Autocomplete menu. Useful in combination with the search method, to close the open menu.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div id="theming">
|
||||
<h2 class="top-header">Theming</h2>
|
||||
<p>The jQuery UI Autocomplete 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.autocomplete.css stylesheet that can be modified. These classes are highlighed in bold below.
|
||||
</p>
|
||||
|
||||
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
|
||||
<input class="ui-autocomplete-input"/><br />
|
||||
<ul class="ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all"><br />
|
||||
<li class="ui-menu-item"><br />
|
||||
<a class="ui-corner-all">item 1</a><br />
|
||||
</li><br />
|
||||
<li class="ui-menu-item"><br />
|
||||
<a class="ui-corner-all">item 2</a><br />
|
||||
</li><br />
|
||||
<li class="ui-menu-item"><br />
|
||||
<a class="ui-corner-all">item 3</a><br />
|
||||
</li><br />
|
||||
</ul>
|
||||
<p class="theme-note">
|
||||
<strong>
|
||||
Note: This is a sample of markup generated by the autocomplete plugin, not markup you should use to create a autocomplete. The only markup needed for that is <input/>.
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 35982 bytes
|
||||
Post-expand include size: 61199 bytes
|
||||
Template argument size: 33647 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3766-1!1!0!!en!2 and timestamp 20110413160314 -->
|
@@ -0,0 +1,500 @@
|
||||
|
||||
<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 Button</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<p>Button enhances standard form elements like button, input of type submit or reset or anchors to themable buttons with appropiate mouseover and active styles.</p>
|
||||
<p>In addition to basic push buttons, radio buttons and checkboxes (inputs of type radio and checkbox) can be converted to buttons: Their associated label is styled to appear as the button, while the underlying input is updated on click.</p>
|
||||
<p>In order to group radio buttons, Button also provides an additional widget-method, called Buttonset. Its used by selecting a container element (which contains the radio buttons) and calling buttonset(). Buttonset will also provide visual grouping, and therefore should be used whenever you have a group of buttons. It works by selecting all descendents and applying button() to them. You can enable and disable a buttonset, which will enable and disable all contained buttons. Destroying a buttonset also calls the button's destroy method.</p>
|
||||
<p>When using an input of type button, submit or reset, support is limited to plain text labels with no icons.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>UI Core</li>
|
||||
<li>UI Widget</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 Button.<br />
|
||||
</p>
|
||||
<pre>$("button").button();
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("button").button();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<button>Button label</button>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
<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>
|
||||
<div id="demo" class="tabs-container" rel="300">
|
||||
A simple jQuery UI Button.<br />
|
||||
</p>
|
||||
<pre>$("#radio").buttonset();
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#radio").buttonset();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<div id="radio">
|
||||
<input type="radio" id="radio1" name="radio" /><label for="radio1">Choice 1</label>
|
||||
<input type="radio" id="radio2" name="radio" checked="checked" /><label for="radio2">Choice 2</label>
|
||||
<input type="radio" id="radio3" name="radio" /><label for="radio3">Choice 3</label>
|
||||
</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 button. Can be set when initialising (first creating) the button.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a button with the <code>disabled</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).button({ disabled: true });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>disabled</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var disabled = $( ".selector" ).button( "option", "disabled" );
|
||||
//setter
|
||||
$( ".selector" ).button( "option", "disabled", true );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-text">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-text">text</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>Whether to show any text - when set to false (display no text), icons (see icons option) must be enabled, otherwise it'll be ignored.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a button with the <code>text</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).button({ text: false });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>text</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var text = $( ".selector" ).button( "option", "text" );
|
||||
//setter
|
||||
$( ".selector" ).button( "option", "text", false );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-icons">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-icons">icons</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Options</dd>
|
||||
|
||||
<dt class="option-default-label">Default:</dt>
|
||||
<dd class="option-default">{ primary: null, secondary: null }</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Icons to display, with or without text (see text option). The primary icon is displayed by default on the left of the label text, the secondary by default is on the right. Value for the primary and secondary properties must be a classname (String), eg. "ui-icon-gear". For using only one icon: icons: {primary:'ui-icon-locked'}. For using two icons: icons: {primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'}</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a button with the <code>icons</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).button({ icons: {primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'} });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>icons</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var icons = $( ".selector" ).button( "option", "icons" );
|
||||
//setter
|
||||
$( ".selector" ).button( "option", "icons", {primary:'ui-icon-gear',secondary:'ui-icon-triangle-1-s'} );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-label">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-label">label</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">HTML content of the button, or value attribute</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Text to show on the button. When not specified (null), the element's html content is used, or its value attribute when it's an input element of type submit or reset; or the html content of the associated label element if its an input of type radio or checkbox</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a button with the <code>label</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).button({ label: "custom label" });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>label</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var label = $( ".selector" ).button( "option", "label" );
|
||||
//setter
|
||||
$( ".selector" ).button( "option", "label", "custom label" );</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-create">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-create">create</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">buttoncreate</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when button is created.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>create</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).button({
|
||||
create: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>create</code> event by type: <code>buttoncreate</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "buttoncreate", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</p>
|
||||
<p>There are no events for this plugin.</p>
|
||||
</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">.button( "destroy"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Remove the button functionality completely. This will return the element back to its pre-init state.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
<p>
|
||||
<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">.button( "disable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Disable the button.</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">.button( "enable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Enable the button.</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">.button( "option"
|
||||
|
||||
, optionName
|
||||
|
||||
, <span class="optional">[</span>value<span class="optional">] </span>
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Get or set any button 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">.button( "option"
|
||||
|
||||
, options
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Set multiple button 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">.button( "widget"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Returns the .ui-button element.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="method" id="method-refresh">
|
||||
<div class="method-header">
|
||||
<h3 class="method-name"><a href="#method-refresh">refresh</a></h3>
|
||||
<dl>
|
||||
<dt class="method-signature-label">Signature:</dt>
|
||||
<dd class="method-signature">.button( "refresh"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Refreshes the visual state of the button. Useful for updating button state after the native element's checked or disabled state is changed programatically.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div id="theming">
|
||||
<h2 class="top-header">Theming</h2>
|
||||
<p>The jQuery UI Button 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.button.css stylesheet that can be modified. These classes are highlighed in bold below.
|
||||
</p>
|
||||
|
||||
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
|
||||
<button class="<strong>ui-button ui-button-text-only</strong> ui-widget ui-state-default ui-corner-all"><br />
|
||||
<span class="<strong>ui-button-text</strong>">Button Label</span><br /></button>
|
||||
<p class="theme-note">
|
||||
<strong>
|
||||
Note: This is a sample of markup generated by the button plugin, not markup you should use to create a button. The only markup needed for that is <button>Button Label</button>.
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 24542 bytes
|
||||
Post-expand include size: 31799 bytes
|
||||
Template argument size: 14018 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3767-1!1!0!!en!2 and timestamp 20110413160314 -->
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,829 @@
|
||||
|
||||
<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 Droppable</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<p>The jQuery UI Droppable plugin makes selected elements droppable (meaning they accept being dropped on by draggables). You can specify which (individually) or which kind of draggables each will accept.</p>
|
||||
<p>All callbacks 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.draggable</b> - current draggable element, a jQuery object.</li>
|
||||
<li> <b>ui.helper</b> - current draggable helper, a jQuery object</li>
|
||||
<li> <b>ui.position</b> - current position of the draggable helper { top: , left: }</li>
|
||||
<li> <b>ui.offset</b> - current absolute position of the draggable helper { top: , left: }</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>UI Core</li>
|
||||
<li>UI Widget</li>
|
||||
<li>UI Mouse</li>
|
||||
<li><a href="http://docs.jquery.com/UI/Draggable" title="UI/Draggable">UI Draggable</a></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="100">
|
||||
Makes the div droppable (a drop target for a draggable).<br />
|
||||
</p>
|
||||
<pre>$("#draggable").draggable();
|
||||
$("#droppable").droppable({
|
||||
drop: function() { alert('dropped'); }
|
||||
});
|
||||
</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.5/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: 75px; height: 25px; background: silver; padding: 10px; }
|
||||
#droppable { position: absolute; left: 250px; top: 0; width: 125px; height: 75px; background: gray; color: white; padding: 10px; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#draggable").draggable();
|
||||
$("#droppable").droppable({
|
||||
drop: function() { alert('dropped'); }
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<div id="droppable">Drop here</div>
|
||||
<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 droppable. Can be set when initialising (first creating) the droppable.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a droppable with the <code>disabled</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({ disabled: true });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>disabled</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var disabled = $( ".selector" ).droppable( "option", "disabled" );
|
||||
//setter
|
||||
$( ".selector" ).droppable( "option", "disabled", true );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-accept">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-accept">accept</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Selector, Function</dd>
|
||||
|
||||
<dt class="option-default-label">Default:</dt>
|
||||
<dd class="option-default">'*'</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>All draggables that match the selector will be accepted. If a function is specified, the function will be called for each draggable on the page (passed as the first argument to the function), to provide a custom filter. The function should return true if the draggable should be accepted.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a droppable with the <code>accept</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({ accept: '.special' });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>accept</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var accept = $( ".selector" ).droppable( "option", "accept" );
|
||||
//setter
|
||||
$( ".selector" ).droppable( "option", "accept", '.special' );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-activeClass">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-activeClass">activeClass</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>If specified, the class will be added to the droppable while an acceptable draggable is being dragged.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a droppable with the <code>activeClass</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({ activeClass: 'ui-state-highlight' });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>activeClass</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var activeClass = $( ".selector" ).droppable( "option", "activeClass" );
|
||||
//setter
|
||||
$( ".selector" ).droppable( "option", "activeClass", 'ui-state-highlight' );</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 ui-droppable class from being added. This may be desired as a performance optimization when calling .droppable() init on many hundreds of elements.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a droppable with the <code>addClasses</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({ addClasses: false });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>addClasses</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var addClasses = $( ".selector" ).droppable( "option", "addClasses" );
|
||||
//setter
|
||||
$( ".selector" ).droppable( "option", "addClasses", false );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-greedy">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-greedy">greedy</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 true, will prevent event propagation on nested droppables.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a droppable with the <code>greedy</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({ greedy: true });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>greedy</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var greedy = $( ".selector" ).droppable( "option", "greedy" );
|
||||
//setter
|
||||
$( ".selector" ).droppable( "option", "greedy", true );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-hoverClass">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-hoverClass">hoverClass</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>If specified, the class will be added to the droppable while an acceptable draggable is being hovered.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a droppable with the <code>hoverClass</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({ hoverClass: 'drophover' });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>hoverClass</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var hoverClass = $( ".selector" ).droppable( "option", "hoverClass" );
|
||||
//setter
|
||||
$( ".selector" ).droppable( "option", "hoverClass", 'drophover' );</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.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a droppable with the <code>scope</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({ scope: 'tasks' });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>scope</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var scope = $( ".selector" ).droppable( "option", "scope" );
|
||||
//setter
|
||||
$( ".selector" ).droppable( "option", "scope", 'tasks' );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-tolerance">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-tolerance">tolerance</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">'intersect'</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Specifies which mode to use for testing whether a draggable is 'over' a droppable. Possible values: 'fit', 'intersect', 'pointer', 'touch'.
|
||||
</p>
|
||||
<ul>
|
||||
<li><b>fit</b>: draggable overlaps the droppable entirely</li>
|
||||
<li><b>intersect</b>: draggable overlaps the droppable at least 50%</li>
|
||||
<li><b>pointer</b>: mouse pointer overlaps the droppable</li>
|
||||
<li><b>touch</b>: draggable overlaps the droppable any amount</li>
|
||||
</ul>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a droppable with the <code>tolerance</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({ tolerance: 'fit' });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>tolerance</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var tolerance = $( ".selector" ).droppable( "option", "tolerance" );
|
||||
//setter
|
||||
$( ".selector" ).droppable( "option", "tolerance", 'fit' );</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-create">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-create">create</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">dropcreate</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when droppable is created.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>create</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({
|
||||
create: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>create</code> event by type: <code>dropcreate</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "dropcreate", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-activate">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-activate">activate</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">dropactivate</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered any time an accepted draggable starts dragging. This can be useful if you want to make the droppable 'light up' when it can be dropped on.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>activate</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({
|
||||
activate: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>activate</code> event by type: <code>dropactivate</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "dropactivate", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-deactivate">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-deactivate">deactivate</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">dropdeactivate</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered any time an accepted draggable stops 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>deactivate</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({
|
||||
deactivate: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>deactivate</code> event by type: <code>dropdeactivate</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "dropdeactivate", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-over">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-over">over</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">dropover</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered as an accepted draggable is dragged 'over' (within the tolerance of) this droppable.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>over</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({
|
||||
over: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>over</code> event by type: <code>dropover</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "dropover", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-out">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-out">out</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">dropout</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when an accepted draggable is dragged out (within the tolerance of) this droppable.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>out</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({
|
||||
out: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>out</code> event by type: <code>dropout</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "dropout", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-drop">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-drop">drop</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">drop</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when an accepted draggable is dropped 'over' (within the tolerance of) this droppable. In the callback, $(this) represents the droppable the draggable is dropped on.
|
||||
ui.draggable represents the draggable.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>drop</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).droppable({
|
||||
drop: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>drop</code> event by type: <code>drop</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "drop", 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">.droppable( "destroy"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Remove the droppable 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">.droppable( "disable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Disable the droppable.</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">.droppable( "enable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Enable the droppable.</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">.droppable( "option"
|
||||
|
||||
, optionName
|
||||
|
||||
, <span class="optional">[</span>value<span class="optional">] </span>
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Get or set any droppable 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">.droppable( "option"
|
||||
|
||||
, options
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Set multiple droppable 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">.droppable( "widget"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Returns the .ui-droppable element.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div id="theming">
|
||||
<h2 class="top-header">Theming</h2>
|
||||
<p>The jQuery UI Droppable 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.droppable.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-droppable</strong>"></div>
|
||||
<p class="theme-note">
|
||||
<strong>
|
||||
Note: This is a sample of markup generated by the droppable plugin, not markup you should use to create a droppable. The only markup needed for that is <div></div>.
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 33718 bytes
|
||||
Post-expand include size: 53508 bytes
|
||||
Template argument size: 26843 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3769-1!1!0!!en!2 and timestamp 20110413160310 -->
|
@@ -0,0 +1,143 @@
|
||||
|
||||
<ul class="UIAPIPlugin-toc">
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#options">Arguments</a></li>
|
||||
</ul>
|
||||
<div class="UIAPIPlugin">
|
||||
<h1>jQuery UI effect</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/effect?section=1" title="Edit section: effect( effect, [options], [speed], [callback] )">edit</a>]</div><a name="effect.28_effect.2C_.5Boptions.5D.2C_.5Bspeed.5D.2C_.5Bcallback.5D_.29"></a><h3>effect( effect, <span class="optional">[</span>options<span class="optional">]</span>, <span class="optional">[</span>speed<span class="optional">]</span>, <span class="optional">[</span>callback<span class="optional">]</span> )</h3>
|
||||
<p>Uses a specific effect on an element (without the show/hide logic).</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>Effects 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">
|
||||
Apply the effect explode if you click on the element.<br />
|
||||
</p>
|
||||
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$("div").<strong class="selflink">effect</strong>("explode");
|
||||
});
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.explode.js"></script>
|
||||
<style type="text/css">
|
||||
div { margin: 0 auto; width: 100px; height: 80px; background: blue; position: relative; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$("div").<strong class="selflink">effect</strong>("explode");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<p>Click me</p><div></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="options">
|
||||
<h2 class="top-header">Arguments</h2>
|
||||
<ul class="options-list">
|
||||
|
||||
<li class="option" id="option-effect">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-effect">effect</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The effect to be used. Possible values: 'blind', 'bounce', 'clip', 'drop', 'explode', 'fold', 'highlight', 'puff', 'pulsate', 'scale', 'shake', 'size', 'slide', 'transfer'.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-options">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-options">options</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Hash</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A object/hash including specific options for the effect.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-speed">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-speed">speed</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String, Number</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-callback">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-callback">callback</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Function</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A function that is called after the effect is completed.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 6364 bytes
|
||||
Post-expand include size: 8780 bytes
|
||||
Template argument size: 5498 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2612-1!1!0!!en!2 and timestamp 20110413154211 -->
|
@@ -0,0 +1,144 @@
|
||||
|
||||
<ul class="UIAPIPlugin-toc">
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#options">Arguments</a></li>
|
||||
</ul>
|
||||
<div class="UIAPIPlugin">
|
||||
<h1>jQuery UI hide</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/hide?section=1" title="Edit section: hide( effect, [options], [speed], [callback] )">edit</a>]</div><a name="hide.28_effect.2C_.5Boptions.5D.2C_.5Bspeed.5D.2C_.5Bcallback.5D_.29"></a><h3>hide( effect, <span class="optional">[</span>options<span class="optional">]</span>, <span class="optional">[</span>speed<span class="optional">]</span>, <span class="optional">[</span>callback<span class="optional">]</span> )</h3>
|
||||
<p>The enhanced hide method optionally accepts jQuery UI advanced effects.</p>
|
||||
<p>Uses a specific effect on an element to hide the element if the first argument is an effect string.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>Effects 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">
|
||||
Apply the effect slide if you click on the p to hide a div.<br />
|
||||
</p>
|
||||
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$("div").<strong class="selflink">hide</strong>("slide", {}, 1000);
|
||||
});
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.slide.js"></script>
|
||||
<style type="text/css">
|
||||
div { margin: 0px; width: 100px; height: 80px; background: blue; position: relative; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$("div").<strong class="selflink">hide</strong>("slide", {}, 1000);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<p>Click me</p><div></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="options">
|
||||
<h2 class="top-header">Arguments</h2>
|
||||
<ul class="options-list">
|
||||
|
||||
<li class="option" id="option-effect">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-effect">effect</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-options">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-options">options</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Hash</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A object/hash including specific options for the effect.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-speed">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-speed">speed</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String, Number</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A string representing one of the predefined speeds ("slow" or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-callback">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-callback">callback</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Function</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A function that is called after the effect is completed.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 6354 bytes
|
||||
Post-expand include size: 8727 bytes
|
||||
Template argument size: 5453 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2614-1!1!0!!en!2 and timestamp 20110413153543 -->
|
@@ -0,0 +1,227 @@
|
||||
|
||||
<ul class="UIAPIPlugin-toc">
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#options">Arguments</a></li>
|
||||
</ul>
|
||||
<div class="UIAPIPlugin">
|
||||
<h1>jQuery UI Position Utility</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<p>Utility script for positioning any widget relative to the window, document, a particular element, or the cursor/mouse.</p>
|
||||
<p><em>Note: jQuery UI does not support positioning hidden elements.</em></p>
|
||||
<p>Does not need ui.core.js or effects.core.js.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li><i>none (only jQuery core)</i></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">
|
||||
Clicking on the green element transfers to the other.<br />
|
||||
</p>
|
||||
<pre>
|
||||
$("#position1").position({
|
||||
my: "center",
|
||||
at: "center",
|
||||
of: "#targetElement"
|
||||
});
|
||||
$("#position2").position({
|
||||
my: "left top",
|
||||
at: "left top",
|
||||
of: "#targetElement"
|
||||
});
|
||||
$("#position3").position({
|
||||
my: "right center",
|
||||
at: "right bottom",
|
||||
of: "#targetElement"
|
||||
});
|
||||
$(document).mousemove(function(ev){
|
||||
$("#position4").position({
|
||||
my: "left bottom",
|
||||
of: ev,
|
||||
offset: "3 -3",
|
||||
collision: "fit"
|
||||
});
|
||||
});
|
||||
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<style type="text/css">
|
||||
#targetElement { width:240px;height:200px;background-color:#999;margin:30px auto; }
|
||||
.positionDiv { width:50px;height:50px;opacity:0.6; }
|
||||
#position1 {background-color:#F00;}
|
||||
#position2 {background-color:#0F0;}
|
||||
#position3 {background-color:#00F;}
|
||||
#position4 {background-color:#FF0;}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$("#position1").position({
|
||||
my: "center",
|
||||
at: "center",
|
||||
of: "#targetElement"
|
||||
});
|
||||
$("#position2").position({
|
||||
my: "left top",
|
||||
at: "left top",
|
||||
of: "#targetElement"
|
||||
});
|
||||
$("#position3").position({
|
||||
my: "right center",
|
||||
at: "right bottom",
|
||||
of: "#targetElement"
|
||||
});
|
||||
$(document).mousemove(function(ev){
|
||||
$("#position4").position({
|
||||
my: "left bottom",
|
||||
of: ev,
|
||||
offset: "3 -3",
|
||||
collision: "fit"
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<div id="targetElement">
|
||||
<div class="positionDiv" id="position1"></div>
|
||||
<div class="positionDiv" id="position2"></div>
|
||||
<div class="positionDiv" id="position3"></div>
|
||||
<div class="positionDiv" id="position4"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="options">
|
||||
<h2 class="top-header">Arguments</h2>
|
||||
<ul class="options-list">
|
||||
|
||||
<li class="option" id="option-my">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-my">my</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Defines which position on <b>the element being positioned</b> to align with the target element: "horizontal vertical" alignment. A single value such as "right" will default to "right center", "top" will default to "center top" (following CSS convention). Acceptable values: "top", "center", "bottom", "left", "right". Example: "left top" or "center center"</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-at">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-at">at</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Defines which position on <b>the target element</b> to align the positioned element against: "horizontal vertical" alignment. A single value such as "right" will default to "right center", "top" will default to "center top" (following CSS convention). Acceptable values: "top", "center", "bottom", "left", "right". Example: "left top" or "center center"</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-of">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-of">of</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Selector, Element, jQuery, Event</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Element to position against. If you provide a selector, the first matching element will be used. If you provide a jQuery object, the first element will be used. If you provide an event object, the pageX and pageY properties will be used. Example: "#top-menu"</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-offset">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-offset">offset</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Add these left-top values to the calculated position, eg. "50 50" (left top) A single value such as "50" will apply to both.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-collision">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-collision">collision</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>When the positioned element overflows the window in some direction, move it to an alternative position. Similar to my and at, this accepts a single value or a pair for horizontal/vertical, eg. "flip", "fit", "fit flip", "fit none".
|
||||
</p>
|
||||
<ul><li> <b>flip</b>: to the opposite side and the collision detection is run again to see if it will fit. If it won't fit in either position, the center option should be used as a fall back.
|
||||
</li><li> <b>fit</b>: so the element keeps in the desired direction, but is re-positioned so it fits.
|
||||
</li><li> <b>none</b>: not do collision detection.
|
||||
</li></ul>
|
||||
<p></p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-using">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-using">using</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Function</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>When specified the actual property setting is delegated to this callback. Receives a single parameter which is a hash of top and left values for the position that should be set.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 7109 bytes
|
||||
Post-expand include size: 10873 bytes
|
||||
Template argument size: 7571 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3784-1!1!0!!en!2 and timestamp 20110413160320 -->
|
@@ -0,0 +1,460 @@
|
||||
|
||||
<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 Progressbar</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<p>
|
||||
The progress bar is designed to simply display the current % complete for a process. The bar is coded to be flexibly sized through CSS and will scale to fit inside it's parent container by default.
|
||||
</p>
|
||||
<p>
|
||||
This is a determinate progress bar, meaning that it should only be used in situations where the system can accurately update the current status complete. A determinate progress bar should never fill from left to right, then loop back to empty for a single process -- if the actual percent complete status cannot be calculated, an indeterminate progress bar (coming soon) or spinner animation is a better way to provide user feedback.
|
||||
</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>UI Core</li>
|
||||
<li>UI Widget</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="100">
|
||||
A simple jQuery UI Progressbar.<br />
|
||||
</p>
|
||||
<pre>$("#progressbar").progressbar({ value: 37 });
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#progressbar").progressbar({ value: 37 });
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<div id="progressbar"></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 progressbar. Can be set when initialising (first creating) the progressbar.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a progressbar with the <code>disabled</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).progressbar({ disabled: true });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>disabled</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var disabled = $( ".selector" ).progressbar( "option", "disabled" );
|
||||
//setter
|
||||
$( ".selector" ).progressbar( "option", "disabled", true );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-value">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-value">value</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">0</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The value of the progressbar.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a progressbar with the <code>value</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).progressbar({ value: 37 });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>value</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var value = $( ".selector" ).progressbar( "option", "value" );
|
||||
//setter
|
||||
$( ".selector" ).progressbar( "option", "value", 37 );</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-create">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-create">create</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">progressbarcreate</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when progressbar is created.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>create</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).progressbar({
|
||||
create: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>create</code> event by type: <code>progressbarcreate</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "progressbarcreate", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-change">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-change">change</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">progressbarchange</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when the value of the progressbar changes.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>change</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).progressbar({
|
||||
change: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>change</code> event by type: <code>progressbarchange</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "progressbarchange", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-complete">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-complete">complete</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">progressbarcomplete</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when the value of the progressbar reaches the maximum value of 100.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>complete</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).progressbar({
|
||||
complete: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>complete</code> event by type: <code>progressbarcomplete</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "progressbarcomplete", 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">.progressbar( "destroy"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Remove the progressbar 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">.progressbar( "disable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Disable the progressbar.</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">.progressbar( "enable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Enable the progressbar.</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">.progressbar( "option"
|
||||
|
||||
, optionName
|
||||
|
||||
, <span class="optional">[</span>value<span class="optional">] </span>
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Get or set any progressbar 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">.progressbar( "option"
|
||||
|
||||
, options
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Set multiple progressbar 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">.progressbar( "widget"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Returns the .ui-progressbar element.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="method" id="method-value">
|
||||
<div class="method-header">
|
||||
<h3 class="method-name"><a href="#method-value">value</a></h3>
|
||||
<dl>
|
||||
<dt class="method-signature-label">Signature:</dt>
|
||||
<dd class="method-signature">.progressbar( "value"
|
||||
|
||||
, <span class="optional">[</span>value<span class="optional">] </span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>This method gets or sets the current value of the progressbar.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div id="theming">
|
||||
<h2 class="top-header">Theming</h2>
|
||||
<p>The jQuery UI Progressbar 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.progressbar.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-progressbar </strong>ui-widget ui-widget-content ui-corner-all"><br />
|
||||
<div style="width: 37%;" class="<strong>ui-progressbar-value</strong> ui-widget-header ui-corner-left"></div><br />
|
||||
</div>
|
||||
<p class="theme-note">
|
||||
<strong>
|
||||
Note: This is a sample of markup generated by the progressbar plugin, not markup you should use to create a progressbar. The only markup needed for that is <div></div>.
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 21686 bytes
|
||||
Post-expand include size: 27328 bytes
|
||||
Template argument size: 10881 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3780-1!1!0!!en!2 and timestamp 20110413160318 -->
|
@@ -0,0 +1,113 @@
|
||||
|
||||
<ul class="UIAPIPlugin-toc">
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#options">Arguments</a></li>
|
||||
</ul>
|
||||
<div class="UIAPIPlugin">
|
||||
<h1>jQuery UI removeClass</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/removeClass?section=1" title="Edit section: removeClass( [class], [duration] )">edit</a>]</div><a name="removeClass.28_.5Bclass.5D.2C_.5Bduration.5D_.29"></a><h3>removeClass( <span class="optional">[</span>class<span class="optional">]</span>, <span class="optional">[</span>duration<span class="optional">]</span> )</h3>
|
||||
<p>Removes all or specified class from each of the set of matched elements with an optional transition between the states.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>Effects 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="100">
|
||||
Removes the class 'selected' from the matched elements with a one second transition.<br />
|
||||
</p>
|
||||
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$(this).<strong class="selflink">removeClass</strong>("selected", 1000);
|
||||
});
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
|
||||
<style type="text/css">
|
||||
p { cursor: pointer; font-size: 1.2em; }
|
||||
.selected { color:red; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$(this).<strong class="selflink">removeClass</strong>("selected", 1000);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<p class="selected">Click me to remove 'selected' class.</p>
|
||||
<p class="selected">Click me to remove 'selected' class.</p>
|
||||
<p class="selected">Click me to remove 'selected' class.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="options">
|
||||
<h2 class="top-header">Arguments</h2>
|
||||
<ul class="options-list">
|
||||
|
||||
<li class="option" id="option-class">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-class">class</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>CSS classes to remove from the elements.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-duration">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-duration">duration</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String, Number</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 5276 bytes
|
||||
Post-expand include size: 7063 bytes
|
||||
Template argument size: 4443 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2607-1!1!0!!en!2 and timestamp 20110413154312 -->
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,848 @@
|
||||
|
||||
<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 Selectable</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<p>The jQuery UI Selectable plugin allows for elements to be selected by dragging a box (sometimes called a lasso) with the mouse over the elements. Also, elements can be selected by click or drag while holding the Ctrl/Meta key, allowing for multiple (non-contiguous) selections.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>UI Core</li>
|
||||
<li>UI Widget</li>
|
||||
<li>UI Mouse</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="">
|
||||
A simple jQuery UI Selectable.<br />
|
||||
</p>
|
||||
<pre>$("#selectable").selectable();
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<style type="text/css">
|
||||
#selectable .ui-selecting {
|
||||
background: silver;
|
||||
}
|
||||
#selectable .ui-selected {
|
||||
background: gray;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#selectable").selectable();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<ul id="selectable">
|
||||
<li>Item 1</li>
|
||||
<li>Item 2</li>
|
||||
<li>Item 3</li>
|
||||
<li>Item 4</li>
|
||||
<li>Item 5</li>
|
||||
</ul>
|
||||
|
||||
</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 selectable. Can be set when initialising (first creating) the selectable.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a selectable with the <code>disabled</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({ disabled: true });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>disabled</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var disabled = $( ".selector" ).selectable( "option", "disabled" );
|
||||
//setter
|
||||
$( ".selector" ).selectable( "option", "disabled", true );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-autoRefresh">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-autoRefresh">autoRefresh</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>This determines whether to refresh (recalculate) the position and size of each selectee at the beginning of each select operation. If you have many many items, you may want to set this to false and call the refresh method manually.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a selectable with the <code>autoRefresh</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({ autoRefresh: false });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>autoRefresh</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var autoRefresh = $( ".selector" ).selectable( "option", "autoRefresh" );
|
||||
//setter
|
||||
$( ".selector" ).selectable( "option", "autoRefresh", false );</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 selecting if you start on elements matching the selector.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a selectable with the <code>cancel</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({ cancel: ':input,option' });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>cancel</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var cancel = $( ".selector" ).selectable( "option", "cancel" );
|
||||
//setter
|
||||
$( ".selector" ).selectable( "option", "cancel", ':input,option' );</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 to define when the selecting should start. It helps preventing unwanted selections when clicking on an element.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a selectable with the <code>delay</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({ delay: 20 });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>delay</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var delay = $( ".selector" ).selectable( "option", "delay" );
|
||||
//setter
|
||||
$( ".selector" ).selectable( "option", "delay", 20 );</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">0</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Tolerance, in pixels, for when selecting should start. If specified, selecting will not start until after mouse is dragged beyond distance.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a selectable with the <code>distance</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({ distance: 20 });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>distance</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var distance = $( ".selector" ).selectable( "option", "distance" );
|
||||
//setter
|
||||
$( ".selector" ).selectable( "option", "distance", 20 );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-filter">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-filter">filter</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">'*'</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The matching child elements will be made selectees (able to be selected).</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a selectable with the <code>filter</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({ filter: 'li' });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>filter</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var filter = $( ".selector" ).selectable( "option", "filter" );
|
||||
//setter
|
||||
$( ".selector" ).selectable( "option", "filter", 'li' );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-tolerance">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-tolerance">tolerance</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">'touch'</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Possible values: 'touch', 'fit'.
|
||||
</p>
|
||||
<ul>
|
||||
<li><b>fit</b>: draggable overlaps the droppable entirely</li>
|
||||
<li><b>touch</b>: draggable overlaps the droppable any amount</li>
|
||||
</ul>
|
||||
<p></p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a selectable with the <code>tolerance</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({ tolerance: 'fit' });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>tolerance</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var tolerance = $( ".selector" ).selectable( "option", "tolerance" );
|
||||
//setter
|
||||
$( ".selector" ).selectable( "option", "tolerance", 'fit' );</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-create">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-create">create</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">selectablecreate</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when selectable is created.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>create</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({
|
||||
create: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>create</code> event by type: <code>selectablecreate</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "selectablecreate", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-selected">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-selected">selected</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">selectableselected</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered at the end of the select operation, on each element added to the selection.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>selected</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({
|
||||
selected: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>selected</code> event by type: <code>selectableselected</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "selectableselected", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-selecting">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-selecting">selecting</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">selectableselecting</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered during the select operation, on each element added to the selection.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>selecting</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({
|
||||
selecting: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>selecting</code> event by type: <code>selectableselecting</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "selectableselecting", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<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">selectablestart</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered at the beginning of the select operation.</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" ).selectable({
|
||||
start: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>start</code> event by type: <code>selectablestart</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "selectablestart", 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">selectablestop</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered at the end of the select operation.</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" ).selectable({
|
||||
stop: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>stop</code> event by type: <code>selectablestop</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "selectablestop", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-unselected">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-unselected">unselected</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">selectableunselected</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered at the end of the select operation, on each element removed from the selection.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>unselected</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({
|
||||
unselected: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>unselected</code> event by type: <code>selectableunselected</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "selectableunselected", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-unselecting">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-unselecting">unselecting</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">selectableunselecting</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered during the select operation, on each element removed from the selection.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>unselecting</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).selectable({
|
||||
unselecting: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>unselecting</code> event by type: <code>selectableunselecting</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "selectableunselecting", 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">.selectable( "destroy"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Remove the selectable 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">.selectable( "disable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Disable the selectable.</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">.selectable( "enable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Enable the selectable.</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">.selectable( "option"
|
||||
|
||||
, optionName
|
||||
|
||||
, <span class="optional">[</span>value<span class="optional">] </span>
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Get or set any selectable 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">.selectable( "option"
|
||||
|
||||
, options
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Set multiple selectable 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">.selectable( "widget"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Returns the .ui-selectable element.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="method" id="method-refresh">
|
||||
<div class="method-header">
|
||||
<h3 class="method-name"><a href="#method-refresh">refresh</a></h3>
|
||||
<dl>
|
||||
<dt class="method-signature-label">Signature:</dt>
|
||||
<dd class="method-signature">.selectable( "refresh"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Refresh the position and size of each selectee element. This method can be used to manually recalculate the position and size of each selectee element. Very useful if autoRefresh is set to false.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div id="theming">
|
||||
<h2 class="top-header">Theming</h2>
|
||||
<p>The jQuery UI Selectable 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.selectable.css stylesheet that can be modified. These classes are highlighed in bold below.
|
||||
</p>
|
||||
|
||||
<h3>Sample markup with jQuery UI CSS Framework classes</h3>
|
||||
<ul class="<strong>ui-selectable</strong>"><br />
|
||||
   <li class="<strong>ui-selectee</strong>"></li><br />
|
||||
   <li class="<strong>ui-selectee</strong>"></li><br />
|
||||
   <li class="<strong>ui-selectee</strong>"></li><br />
|
||||
</ul>
|
||||
<p class="theme-note">
|
||||
<strong>
|
||||
Note: This is a sample of markup generated by the selectable plugin, not markup you should use to create a selectable. The only markup needed for that is <br /><ul><br />
|
||||
   <li></li><br />
|
||||
   <li></li><br />
|
||||
   <li></li><br />
|
||||
</ul>.
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 34703 bytes
|
||||
Post-expand include size: 54220 bytes
|
||||
Template argument size: 27222 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3771-1!1!0!!en!2 and timestamp 20110413160311 -->
|
@@ -0,0 +1,144 @@
|
||||
|
||||
<ul class="UIAPIPlugin-toc">
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#options">Arguments</a></li>
|
||||
</ul>
|
||||
<div class="UIAPIPlugin">
|
||||
<h1>jQuery UI show</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/show?section=1" title="Edit section: show( effect, [options], [speed], [callback] )">edit</a>]</div><a name="show.28_effect.2C_.5Boptions.5D.2C_.5Bspeed.5D.2C_.5Bcallback.5D_.29"></a><h3>show( effect, <span class="optional">[</span>options<span class="optional">]</span>, <span class="optional">[</span>speed<span class="optional">]</span>, <span class="optional">[</span>callback<span class="optional">]</span> )</h3>
|
||||
<p>The enhanced show method optionally accepts jQuery UI advanced effects.</p>
|
||||
<p>Uses a specific effect on an element to show the element if the first argument is a effect string.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>Effects 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">
|
||||
Apply the effect slide if you click on the p to show a div.<br />
|
||||
</p>
|
||||
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$("div").<strong class="selflink">show</strong>("slide", {}, 1000);
|
||||
});
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.slide.js"></script>
|
||||
<style type="text/css">
|
||||
div { display: none; margin: 0px; width: 100px; height: 80px; background: blue; position: relative; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$("div").<strong class="selflink">show</strong>("slide", {}, 1000);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<p>Click me</p><div></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="options">
|
||||
<h2 class="top-header">Arguments</h2>
|
||||
<ul class="options-list">
|
||||
|
||||
<li class="option" id="option-effect">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-effect">effect</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-options">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-options">options</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Hash</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A object/hash including specific options for the effect.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-speed">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-speed">speed</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String, Number</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A string representing one of the predefined speeds ("slow" or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-callback">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-callback">callback</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Function</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A function that is called after the effect is completed.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 6354 bytes
|
||||
Post-expand include size: 8726 bytes
|
||||
Template argument size: 5452 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2613-1!1!0!!en!2 and timestamp 20110413153813 -->
|
@@ -0,0 +1,860 @@
|
||||
|
||||
<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 Slider</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<p>The jQuery UI Slider plugin makes selected elements into sliders. There are various options such as multiple handles, and ranges. The handle can be moved with the mouse or the arrow keys.</p>
|
||||
<p>All callbacks 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><p>The slider widget will create handle elements with the class 'ui-slider-handle' on initialization. You can specify custom handle elements by creating and appending the elements and adding the 'ui-slider-handle' class before init. It will only create the number of handles needed to match the length of value/values. For example, if you specify 'values: [1, 5, 18]' and create one custom handle, the plugin will create the other two.
|
||||
</p>
|
||||
<ul>
|
||||
<li><b>ui.handle</b>: DOMElement - the current focused handle
|
||||
<li><b>ui.value</b>: Integer - the current handle's value
|
||||
</ul>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>UI Core</li>
|
||||
<li>UI Widget</li>
|
||||
<li>UI Mouse</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="">
|
||||
A simple jQuery UI Slider.<br />
|
||||
</p>
|
||||
<pre>$("#slider").slider();
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<style type="text/css">
|
||||
#slider { margin: 10px; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("#slider").slider();
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<div id="slider"></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 slider. Can be set when initialising (first creating) the slider.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a slider with the <code>disabled</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({ disabled: true });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>disabled</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var disabled = $( ".selector" ).slider( "option", "disabled" );
|
||||
//setter
|
||||
$( ".selector" ).slider( "option", "disabled", true );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-animate">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-animate">animate</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Boolean, String, Number</dd>
|
||||
|
||||
<dt class="option-default-label">Default:</dt>
|
||||
<dd class="option-default">false</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Whether to slide handle smoothly when user click outside handle on the bar. Will also accept a string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a slider with the <code>animate</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({ animate: true });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>animate</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var animate = $( ".selector" ).slider( "option", "animate" );
|
||||
//setter
|
||||
$( ".selector" ).slider( "option", "animate", true );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-max">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-max">max</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">100</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The maximum value of the slider.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a slider with the <code>max</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({ max: 7 });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>max</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var max = $( ".selector" ).slider( "option", "max" );
|
||||
//setter
|
||||
$( ".selector" ).slider( "option", "max", 7 );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-min">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-min">min</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">0</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The minimum value of the slider.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a slider with the <code>min</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({ min: -7 });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>min</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var min = $( ".selector" ).slider( "option", "min" );
|
||||
//setter
|
||||
$( ".selector" ).slider( "option", "min", -7 );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-orientation">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-orientation">orientation</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">'horizontal'</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>This option determines whether the slider has the min at the left, the max at the right or the min at the bottom, the max at the top. Possible values: 'horizontal', 'vertical'.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a slider with the <code>orientation</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({ orientation: 'vertical' });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>orientation</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var orientation = $( ".selector" ).slider( "option", "orientation" );
|
||||
//setter
|
||||
$( ".selector" ).slider( "option", "orientation", 'vertical' );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-range">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-range">range</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 slider will detect if you have two handles and create a stylable range element between these two. Two other possible values are 'min' and 'max'. A min range goes from the slider min to one handle. A max range goes from one handle to the slider max.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a slider with the <code>range</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({ range: 'min' });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>range</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var range = $( ".selector" ).slider( "option", "range" );
|
||||
//setter
|
||||
$( ".selector" ).slider( "option", "range", 'min' );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-step">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-step">step</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">1</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Determines the size or amount of each interval or step the slider takes between min and max. The full specified value range of the slider (max - min) needs to be evenly divisible by the step.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a slider with the <code>step</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({ step: 5 });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>step</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var step = $( ".selector" ).slider( "option", "step" );
|
||||
//setter
|
||||
$( ".selector" ).slider( "option", "step", 5 );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-value">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-value">value</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">0</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>Determines the value of the slider, if there's only one handle. If there is more than one handle, determines the value of the first handle.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a slider with the <code>value</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({ value: 37 });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>value</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var value = $( ".selector" ).slider( "option", "value" );
|
||||
//setter
|
||||
$( ".selector" ).slider( "option", "value", 37 );</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-values">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-values">values</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">null</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>This option can be used to specify multiple handles. If range is set to true, the length of 'values' should be 2.</p>
|
||||
</div>
|
||||
<div class="option-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="option-examples-list">
|
||||
|
||||
<dt>
|
||||
Initialize a slider with the <code>values</code> option specified.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({ values: [1,5,9] });</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Get or set the <code>values</code> option, after init.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>//getter
|
||||
var values = $( ".selector" ).slider( "option", "values" );
|
||||
//setter
|
||||
$( ".selector" ).slider( "option", "values", [1,5,9] );</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-create">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-create">create</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">slidecreate</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when slider is created.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>create</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({
|
||||
create: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>create</code> event by type: <code>slidecreate</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "slidecreate", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<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">slidestart</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when the user starts sliding.</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" ).slider({
|
||||
start: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>start</code> event by type: <code>slidestart</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "slidestart", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-slide">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-slide">slide</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">slide</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered on every mouse move during slide. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(..).slider('value', index) to get another handles' value.
|
||||
</p><p>Return false in order to prevent a slide, based on ui.value.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>slide</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({
|
||||
slide: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>slide</code> event by type: <code>slide</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "slide", function(event, ui) {
|
||||
...
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="event" id="event-change">
|
||||
<div class="event-header">
|
||||
<h3 class="event-name"><a href="#event-change">change</a></h3>
|
||||
<dl>
|
||||
<dt class="event-type-label">Type:</dt>
|
||||
<dd class="event-type">slidechange</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered on slide stop, or if the value is changed programmatically (by the <code>value</code> method). Takes arguments event and ui. Use event.orginalEvent to detect whether the value changed by mouse, keyboard, or programmatically. Use ui.value (single-handled sliders) to obtain the value of the current handle, $(this).slider('values', index) to get another handle's value.</p>
|
||||
</div>
|
||||
<div class="event-examples">
|
||||
<h4>Code examples</h4>
|
||||
<dl class="event-examples-list">
|
||||
|
||||
<dt>
|
||||
Supply a callback function to handle the <code>change</code> event as an init option.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).slider({
|
||||
change: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>change</code> event by type: <code>slidechange</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "slidechange", 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">slidestop</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="event-description">
|
||||
<p>This event is triggered when the user stops sliding.</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" ).slider({
|
||||
stop: function(event, ui) { ... }
|
||||
});</code></pre>
|
||||
</dd>
|
||||
|
||||
|
||||
<dt>
|
||||
Bind to the <code>stop</code> event by type: <code>slidestop</code>.
|
||||
</dt>
|
||||
<dd>
|
||||
<pre><code>$( ".selector" ).bind( "slidestop", 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">.slider( "destroy"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Remove the slider 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">.slider( "disable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Disable the slider.</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">.slider( "enable"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Enable the slider.</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">.slider( "option"
|
||||
|
||||
, optionName
|
||||
|
||||
, <span class="optional">[</span>value<span class="optional">] </span>
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Get or set any slider 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">.slider( "option"
|
||||
|
||||
, options
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Set multiple slider 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">.slider( "widget"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Returns the .ui-slider element.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="method" id="method-value">
|
||||
<div class="method-header">
|
||||
<h3 class="method-name"><a href="#method-value">value</a></h3>
|
||||
<dl>
|
||||
<dt class="method-signature-label">Signature:</dt>
|
||||
<dd class="method-signature">.slider( "value"
|
||||
|
||||
, <span class="optional">[</span>value<span class="optional">] </span>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Gets or sets the value of the slider. For single handle sliders.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="method" id="method-values">
|
||||
<div class="method-header">
|
||||
<h3 class="method-name"><a href="#method-values">values</a></h3>
|
||||
<dl>
|
||||
<dt class="method-signature-label">Signature:</dt>
|
||||
<dd class="method-signature">.slider( "values"
|
||||
|
||||
, index
|
||||
|
||||
, <span class="optional">[</span>value<span class="optional">] </span>
|
||||
|
||||
|
||||
|
||||
)</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="method-description">
|
||||
<p>Gets or sets the values of the slider. For multiple handle or range sliders.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
<div id="theming">
|
||||
<h2 class="top-header">Theming</h2>
|
||||
<p>The jQuery UI Slider 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.slider.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="ui-slider<strong> ui-slider-horizontal</strong> ui-widget ui-widget-content ui-corner-all"><br />
|
||||
<a style="left: 0%;" class="<strong>ui-slider-handle</strong> ui-state-default ui-corner-all" href="#"></a><br />
|
||||
</div><br />
|
||||
<p class="theme-note">
|
||||
<strong>
|
||||
Note: This is a sample of markup generated by the slider plugin, not markup you should use to create a slider. The only markup needed for that is <div><div>.
|
||||
</strong>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 36451 bytes
|
||||
Post-expand include size: 55582 bytes
|
||||
Template argument size: 27644 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:3776-1!1!0!!en!2 and timestamp 20110413160318 -->
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,129 @@
|
||||
|
||||
<ul class="UIAPIPlugin-toc">
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#options">Arguments</a></li>
|
||||
</ul>
|
||||
<div class="UIAPIPlugin">
|
||||
<h1>jQuery UI switchClass</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/switchClass?section=1" title="Edit section: switchClass( remove, add, [duration] )">edit</a>]</div><a name="switchClass.28_remove.2C_add.2C_.5Bduration.5D_.29"></a><h3>switchClass( remove, add, <span class="optional">[</span>duration<span class="optional">]</span> )</h3>
|
||||
<p>Switches from the class defined in the first argument to the class defined as second argument, using an optional transition.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>Effects 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">
|
||||
Switch the class 'highlight' to 'blue' when a paragraph is clicked with a one second transition.<br />
|
||||
</p>
|
||||
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$(this).<strong class="selflink">switchClass</strong>("highlight", "blue", 1000);
|
||||
});
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
|
||||
<style type="text/css">
|
||||
p { margin: 4px; font-size:16px; font-weight:bolder;
|
||||
cursor:pointer; }
|
||||
.blue { background: blue; }
|
||||
.highlight { background:yellow; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$(this).<strong class="selflink">switchClass</strong>("highlight", "blue", 1000);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<p class="highlight">Click to switch</p>
|
||||
<p class="highlight">to blue</p>
|
||||
<p class="highlight">on these</p>
|
||||
<p class="highlight">paragraphs</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="options">
|
||||
<h2 class="top-header">Arguments</h2>
|
||||
<ul class="options-list">
|
||||
|
||||
<li class="option" id="option-remove">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-remove">remove</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The CSS class that will be removed.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-add">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-add">add</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The CSS class that will be added.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-duration">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-duration">duration</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String, Number</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 5818 bytes
|
||||
Post-expand include size: 7682 bytes
|
||||
Template argument size: 4812 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2609-1!1!0!!en!2 and timestamp 20110413154448 -->
|
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,144 @@
|
||||
|
||||
<ul class="UIAPIPlugin-toc">
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#options">Arguments</a></li>
|
||||
</ul>
|
||||
<div class="UIAPIPlugin">
|
||||
<h1>jQuery UI toggle</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/toggle?section=1" title="Edit section: toggle( effect, [options], [speed], [callback] )">edit</a>]</div><a name="toggle.28_effect.2C_.5Boptions.5D.2C_.5Bspeed.5D.2C_.5Bcallback.5D_.29"></a><h3>toggle( effect, <span class="optional">[</span>options<span class="optional">]</span>, <span class="optional">[</span>speed<span class="optional">]</span>, <span class="optional">[</span>callback<span class="optional">]</span> )</h3>
|
||||
<p>The enhanced toggle method optionally accepts jQuery UI advanced effects.</p>
|
||||
<p>Uses a specific effect on an element to toggle the element if the first argument is an effect string.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>Effects 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">
|
||||
Apply the effect slide if you click on the p to toggle a div.<br />
|
||||
</p>
|
||||
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$("div").<strong class="selflink">toggle</strong>("slide", {}, 1000);
|
||||
});
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.slide.js"></script>
|
||||
<style type="text/css">
|
||||
div { display: none; margin: 0px; width: 100px; height: 80px; background: blue; position: relative; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$("div").<strong class="selflink">toggle</strong>("slide", {}, 1000);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<p>Click me</p><div></div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="options">
|
||||
<h2 class="top-header">Arguments</h2>
|
||||
<ul class="options-list">
|
||||
|
||||
<li class="option" id="option-effect">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-effect">effect</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>The effect to be used. Possible values: 'blind', 'clip', 'drop', 'explode', 'fold', 'puff', 'slide', 'scale', 'size', 'pulsate'.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-options">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-options">options</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Hash</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A object/hash including specific options for the effect.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-speed">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-speed">speed</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String, Number</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A string representing one of the predefined speeds ("slow" or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-callback">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-callback">callback</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">Function</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A function that is called after the effect is completed.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 6372 bytes
|
||||
Post-expand include size: 8797 bytes
|
||||
Template argument size: 5515 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2615-1!1!0!!en!2 and timestamp 20110413154256 -->
|
@@ -0,0 +1,111 @@
|
||||
|
||||
<ul class="UIAPIPlugin-toc">
|
||||
<li><a href="#overview">Overview</a></li>
|
||||
<li><a href="#options">Arguments</a></li>
|
||||
</ul>
|
||||
<div class="UIAPIPlugin">
|
||||
<h1>jQuery UI toggleClass</h1>
|
||||
<div id="overview">
|
||||
<h2 class="top-header">Overview</h2>
|
||||
<div id="overview-main">
|
||||
<div class="editsection" style="float:right;margin-left:5px;">[<a href="http://docs.jquery.com/action/edit/UI/Effects/toggleClass?section=1" title="Edit section: toggleClass( class, [duration] )">edit</a>]</div><a name="toggleClass.28_class.2C_.5Bduration.5D_.29"></a><h3>toggleClass( class, <span class="optional">[</span>duration<span class="optional">]</span> )</h3>
|
||||
<p>Adds the specified class if it is not present, and removes the specified class if it is present, using an optional transition.</p>
|
||||
</div>
|
||||
<div id="overview-dependencies">
|
||||
<h3>Dependencies</h3>
|
||||
<ul>
|
||||
<li>Effects 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="100">
|
||||
Adds the 'selected' class if it is not present, and removes the 'selected' class if it is present.<br />
|
||||
</p>
|
||||
<pre>$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$(this).<strong class="selflink">toggleClass</strong>("selected", 1000);
|
||||
});
|
||||
</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.5/jquery.min.js"></script>
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
|
||||
<script src="http://ui.jquery.com/latest/ui/effects.core.js"></script>
|
||||
<style type="text/css">
|
||||
p { cursor: pointer; font-size: 1.2em; }
|
||||
.selected { color:red; }
|
||||
</style>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$("p").<a href="http://docs.jquery.com/Events/click" title="Events/click">click</a>(function () {
|
||||
$(this).<strong class="selflink">toggleClass</strong>("selected", 1000);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="font-size:62.5%;">
|
||||
|
||||
<p>Click me to toggle 'selected' class.</p>
|
||||
<p class="selected">Click me to toggle 'selected' class.</p>
|
||||
<p>Click me to toggle 'selected' class.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
</pre>
|
||||
<p></div>
|
||||
</p><p></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="options">
|
||||
<h2 class="top-header">Arguments</h2>
|
||||
<ul class="options-list">
|
||||
|
||||
<li class="option" id="option-class">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-class">class</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String</dd>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A CSS class to toggle on the elements.</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
|
||||
<li class="option" id="option-duration">
|
||||
<div class="option-header">
|
||||
<h3 class="option-name"><a href="#option-duration">duration</a></h3>
|
||||
<dl>
|
||||
<dt class="option-type-label">Type:</dt>
|
||||
<dd class="option-type">String, Number</dd>
|
||||
|
||||
<dt class="option-optional-label">Optional</dt>
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
<div class="option-description">
|
||||
<p>A string representing one of the three predefined speeds ("slow", "normal", or "fast") or the number of milliseconds to run the animation (e.g. 1000).</p>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</p><!--
|
||||
Pre-expand include size: 5251 bytes
|
||||
Post-expand include size: 6929 bytes
|
||||
Template argument size: 4383 bytes
|
||||
Maximum: 2097152 bytes
|
||||
-->
|
||||
|
||||
<!-- Saved in parser cache with key jqdocs_docs:pcache:idhash:2608-1!1!0!!en!2 and timestamp 20110413154341 -->
|
Reference in New Issue
Block a user