-
accordion( Options options ) returns jQuery
Make the selected elements Accordion widgets.
Semantic requirements:
If the structure of your container is flat with unique tags for header and content elements, eg. a definition list (dl > dt + dd), you don't have to specify any options at all.
If your structure uses the same elements for header and content or uses some kind of nested structure, you have to specify the header elements, eg. via class, see the second example.
Use activate(Number) to change the active content programmatically.
A change event is triggered everytime the accordion changes. Apart from the event object, all arguments are jQuery objects. Arguments: event, newHeader, oldHeader, newContent, oldContentOptions
Example:
A simple jQuery UI Accordion.
$("#example").accordion();
HTML:
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)"> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/dimensions/jquery.dimensions.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/ui/current/ui.accordion.js"></script> <ul id="example" class="ui-accordion-container" style="width: 200px;"> <li> <div class="ui-accordion-left"></div> <a href='#' class="ui-accordion-link"> Test 1 <div class="ui-accordion-right"></div> </a> <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </div> </li> <li> <div class="ui-accordion-left"></div> <a href='#' class="ui-accordion-link">Test 2<div class="ui-accordion-right"></div></a> <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </div> </li> <li> <div class="ui-accordion-left"></div> <a href='#' class="ui-accordion-link">Test 3<div class="ui-accordion-right"></div></a> <div>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </div> </li> </ul>
-
activate( String, Element, jQuery, Boolean, Number index ) returns jQuery
Activate a content part of the Accordion programmatically.
The index can be a zero-indexed number to match the position of the header to close or a string expression matching an element. Pass -1 to close all (only possible with alwaysOpen:false).Example:
Activate the second content of the Accordion contained in <div id="accordion">.
$(".selector").activate(1)
Example:
Close all content parts of the accordion.
$(".selector").activate(false)
Example:
Activate the first element matching the given expression.
$(".selector").activate("a:first")
-
datepicker( Options options ) returns jQuery
The method that you use to create a new date picker. Customize with plenty of options.
Attach the date picker to an input or for an inline view attach the date picker to a div or span.Options
Example:
A simple jQuery UI Datepicker.
$('#example').datepicker(); $('#exampleRange').datepicker({rangeSelect: true, firstDay: 1 });
HTML:
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/themes/flora/flora.datepicker.css" type="text/css" media="screen" title="Flora (Default)"> <script src="http://dev.jquery.com/view/trunk/ui/current/datepicker/core/ui.datepicker.js"></script> <input type="text" id="example" value="Click inside me to see a datepicker" style="width:300px;"/> <input type="text" id="exampleRange" value="A range datepicker starting on Monday" style="width:300px;"/>
Example:
Add a datepicker that appears on focus or a click on an icon.
$('.invokeBoth').datepicker({ showOn: 'both', buttonImageOnly: true, buttonImage: 'datepicker.gif', buttonText: 'datepicker' });
Example:
Add a datepicker that doesn't allow selection of days on weekends.
$('#noWeekends').datepicker({ beforeShowDay: $.datepicker.noWeekends });
Example:
Add a datepicker that defaults to 7 days in the future.
$('#openDatePlus7').datepicker({ defaultDate: +7 });
Example:
Add a datepicker in French. Requires loading of the French localization package.
$('#frenchdatepicker').datepicker( $.datepicker.regional['fr'] );
-
dialog( Options options ) returns jQuery
Make the selected elements Dialog boxes.
Options
Example:
A simple jQuery UI Modal Dialog.
$("#example").dialog();
HTML:
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)"> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/dimensions/jquery.dimensions.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/ui/current/ui.dialog.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/ui/current/ui.resizable.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/ui/current/ui.mouse.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/ui/current/ui.draggable.js"></script> <div id="example" class="flora" title="This is my title">I'm in a dialog!</div>
-
dialogClose( ) returns jQuery
Closes the specified dialog boxes.
-
dialogDatepicker( String dateText, Function onSelect, Options settings, Number[2] or MouseEvent pos ) returns Datepicker
Open a datepicker in a "dialog" box.
Example:
Open a datepicker in a "dialog" box.
$.datepicker.dialogDatepicker($('#invokeDialog').val(), setDateFromDialog, {prompt: 'Choose a date', speed: ''});
-
dialogOpen( ) returns jQuery
Opens the specified dialog boxes.
-
disableFor( Element,Selector,jQuery collection target ) returns Datepicker
Disable an input field and its attached date picker.
Example:
Disable the date picker for an input field.
$.datepicker.disableFor('#invokeFocus');
-
draggable( Options options ) returns Dragset
Creates new draggables on the nodeset supplied by the query.
This jQuery plugin makes DOM nodes draggable by mouse. You can additionally supply a great range of options to make them fit your needs.Options
Example:
Makes the div draggable.
$(".block").draggable();
HTML:
<script src="http://dev.jquery.com/view/trunk/ui/current/ui.mouse.js"></script> <script src="http://dev.jquery.com/view/trunk/ui/current/ui.draggable.js"></script> <script src="http://dev.jquery.com/view/trunk/ui/current/ui.draggable.ext.js"></script> <div class="block"></div>
-
draggableDestroy( ) returns jQuery
Destroys all draggable functionality in the current jQuery.
Destroys all draggable functionality in the current jQuery. -
draggableDisable( ) returns jQuery
Disables draggables.
Temporarily disables draggables on the current jQuery. Can be re-enabled again later on. -
draggableEnable( ) returns jQuery
Enables draggables.
Re-enables draggable functionality on the jQuery supplied that has been disabled before. -
draggableInstance( ) returns Instance
Returns the OO instance of the current draggable.
For the advanced, this function is very useful to modify internals of the draggables after initializing it. It returns a javascript function instance. -
droppable( Options options ) returns Dropset
Creates new droppables on the nodeset supplied by the query.
This jQuery plugin makes DOM nodes droppable (meaning they accept being dropped on by draggables). You can specify which (individually) or which kind of draggables each will accept.Options
Example:
Makes the div drag and droppable.
$(".block").draggable({helper: 'clone'}); $(".drop").droppable({ accept: ".block", activeClass: 'droppable-active', hoverClass: 'droppable-hover', drop: function(ev, ui) { $(this).append("<br>Dropped!"); } });
HTML:
<script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.mouse.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.draggable.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.draggable.ext.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.droppable.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.droppable.ext.js"></script> <div class="block">drag me!</div> <div class="drop">drop on me!</div>
-
droppableDestroy( ) returns jQuery
Destroys all droppable functionality in the current jQuery.
Destroys all droppable functionality in the current jQuery. -
droppableDisable( ) returns jQuery
Disables droppables.
Temporarily disables droppables on the current jQuery. Can be re-enabled again later on. -
droppableEnable( ) returns jQuery
Enables droppables.
Re-enables droppable functionality on the jQuery supplied that has been disabled before. -
droppableInstance( ) returns Instance
Returns the OO instance of the current droppable.
For the advanced, this function is very useful to modify internals of the droppables after initializing it. It returns a javascript function instance. -
enableFor( Element,Selector,jQuery collection target ) returns Datepicker
Enable an input field and its attached date picker.
Example:
Enable the date picker for an input field.
$.datepicker.enableFor('#invokeFocus');
-
formatDate( String format, Date date, String[7] dayNamesShort, String[7] dayNames, String[12] monthNamesShort, String[12] monthNames ) returns String
Format a date into a string value with a specified format.
The format can be combinations of the following: * d - day of month (no leading zero) * dd - day of month (two digit) * D - day name short * DD - day name long * m - month of year (no leading zero) * mm - month of year (two digit) * M - month name short * MM - month name long * y - year (two digit) * yy - year (four digit) * '...' - literal text * '' - single quote * anything else - literal text '''Since v3.1.'''Example:
Display the date in ISO format. Produces '2007-01-26'.
$.datepicker.formatDate('yy-mm-dd', new Date(2007, 1 - 1, 26));
Example:
Display the date in expanded French format. Produces 'Samedi, Juillet 14, 2007'.
$.datepicker.formatDate('DD, MM d, yy', new Date(2007, 7 - 1, 14), $.datepicker.regional['fr'].dayNamesShort, $.datepicker.regional['fr'].dayNames, $.datepicker.regional['fr'].monthNamesShort, $.datepicker.regional['fr'].monthNames);
-
getDateFor( Element,Selector,jQuery collection control ) returns Date or Date[2]
Retrieve the current date from the date picker attached to an input field.
If the date picker has rangeSelect set to true, then a two-element array of dates is returned denoting the start and end of the range.Example:
Retrieve the date for an input field.
var date = $.datepicker.getDateFor('#invokeFocus');
-
hideDatepicker( String speed ) returns Datepicker
Close a previously opened date picker.
Example:
Close the opened date picker.
$.datepicker.hideDatepicker();
-
isDisabled( Element,Selector,jQuery collection input ) returns Boolean
Determine whether or not an input field has been disabled for the date picker.
Example:
Retrieve the date for an input field.
if ($.datepicker.isDisabled('#invokeFocus')) ...
-
iso8601Week( Date date ) returns Number
Determine the week of the year for a given date: 1 to 53.
This function uses the ISO 8601 definition of a week: weeks start on a Monday and the first week of the year contains January 4. This means that up to three days from the previous year may be included in the first week of the current year, and that up to three days from the current year may be included in the last week of the previous year.<br/>'''Since v3.1.'''Example:
Find the week of the year for a date.
$.datepicker.iso8601Week(new Date(2007, 1 - 1, 26));
-
magnifier( Options options ) returns jQuery
Make the contents of the selected elements magnify upon mouse proximity.
Options
Example:
Makes the images in the block magnify on mouse move.
$("#example").magnifier();
HTML:
<script src="http://dev.jquery.com/view/trunk/plugins/dimensions/jquery.dimensions.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.mouse.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.magnifier.js"></script> <div id='example' class="ui-wrapper example" style="padding: 20px;"> <img src="http://dev.jquery.com/view/trunk/plugins/ui/demos/images/clock.png" width="48" align="left" /> <img src="http://dev.jquery.com/view/trunk/plugins/ui/demos/images/clock.png" width="48" align="left" /> <img src="http://dev.jquery.com/view/trunk/plugins/ui/demos/images/clock.png" width="48" align="left" /> <img src="http://dev.jquery.com/view/trunk/plugins/ui/demos/images/clock.png" width="48" align="left" /> <img src="http://dev.jquery.com/view/trunk/plugins/ui/demos/images/clock.png" width="48" align="left" /> <img src="http://dev.jquery.com/view/trunk/plugins/ui/demos/images/clock.png" width="48" align="left" /> </div>
-
magnifierDestroy( ) returns jQuery
Destroys all magnifier functionality in the current jQuery.
Destroys all magnifier functionality in the current jQuery. -
magnifierDisable( ) returns jQuery
Disables magnification.
Temporarily disables magnification on the current jQuery. Can be re-enabled again later on. -
magnifierEnable( ) returns jQuery
Enables magnifying.
Re-enables magnifying on the jQuery supplied that has been disabled before. -
magnifierInstance( ) returns Instance
Returns the OO instance of the current magnifier.
For the advanced, this function is very useful to modify internals of the magnifier after initializing it. It returns a javascript function instance. -
magnifierReset( ) returns jQuery
Resets the magnifying on a magnified set of elements.
This option resets the magnification to zero on the current set. It's very useful if you want to have another effect on click, for example. -
parseDate( String format, String value, Number shortYearCutoff, String[7] dayNamesShort, String[7] dayNames, String[12] monthNamesShort, String[12] monthNames ) returns Date
Extract a date from a string value with a specified format.
The format can be combinations of the following: * d - day of month (no leading zero) * dd - day of month (two digit) * D - day name short * DD - day name long * m - month of year (no leading zero) * mm - month of year (two digit) * M - month name short * MM - month name long * y - year (two digit) * yy - year (four digit) * '...' - literal text * '' - single quote * anything else - literal text A number of exceptions may be thrown: * 'Invalid arguments' if either ''format'' or ''value'' is null * 'Missing number at position nn' if ''format'' indicated a numeric value that is not then found * 'Unknown name at position nn' if ''format'' indicated day or month name that is not then found * 'Unexpected literal at position nn' if ''format'' indicated a literal value that is not then found * 'Invalid date' if the date is invalid, such as '31/02/2007' '''Since v3.1.'''Example:
Extract a date in ISO format.
$.datepicker.parseDate('yy-mm-dd', '2007-01-26');
Example:
Extract a date in expanded French format.
$.datepicker.parseDate('DD, MM d, yy', 'Samedi, Juillet 14, 2007', 20, $.datepicker.regional['fr'].dayNamesShort, $.datepicker.regional['fr'].dayNames, $.datepicker.regional['fr'].monthNamesShort, $.datepicker.regional['fr'].monthNames);
-
reconfigureFor( Element,Selector,jQuery collection control, Options settings ) returns Datepicker
Change the settings for a previously attached date picker.
Example:
Reconfigure the date picker for an input field - changing its opening speed.
$.datepicker.reconfigureFor('#reconfigureCal', {speed: select.options[select.selectedIndex].value});
-
resizable( Options options ) returns
Creates new resizables on the nodeset supplied by the query.
This jQuery plugin makes DOM nodes resizable (meaning they have draggable resize handles). You can specify one or more handles as well as min and max width and height.Options
Example:
A simple jQuery UI Resizable.
$("#example").resizable();
HTML:
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)"> <script src="http://dev.jquery.com/view/trunk/plugins/dimensions/jquery.dimensions.js"></script> <script src="http://dev.jquery.com/view/trunk/ui/current/ui.mouse.js"></script> <script src="http://dev.jquery.com/view/trunk/ui/current/ui.resizable.js"></script> <div id='example' class="ui-wrapper example"> <div style='position: absolute; top: 20px; left: 20px; bottom: 20px; right: 20px;'>Resize me</div> </div>
-
resizableDestroy( ) returns jQuery
Destroys all resizing functionality in the current jQuery.
Destroys all resizing functionality in the current jQuery. -
resizableDisable( ) returns jQuery
Disables resizing.
Temporarily disables resizing on the current jQuery. Can be re-enabled again later on. -
resizableEnable( ) returns jQuery
Enables resizing.
Re-enables resizing functionality on the jQuery supplied that has been disabled before. -
resizableInstance( ) returns Instance
Returns the OO instance of the current resizable.
For the advanced, this function is very useful to modify internals of the resizable after initializing it. It returns a javascript function instance. -
selectable( Options options ) returns
Creates new selectable on the nodeset supplied by the query.
Options
Example:
Basic Example of a selectable. (Draw a box with your mouse to select items.)
$("#myList").selectable();
HTML:
<script src="http://dev.jquery.com/view/trunk/plugins/dimensions/jquery.dimensions.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.mouse.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.draggable.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.droppable.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.selectable.js"></script> <ul id="myList"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> </ul>
-
setDateFor( Element,Selector,jQuery collection control, Date date, Date endDate ) returns Datepicker
Set the current date for the date picker attached to an input field.
Example:
Set the date for an input field.
$.datepicker.setDateFor('#invokeFocus', new Date(2007, 1 - 1, 26));
Example:
Set the date for a date range input field.
$.datepicker.setDateFor('#dateRange', new Date(2007, 1 - 1, 26), new Date(2007, 1 - 1, 30));
-
setDefaults( Options settings ) returns Datepicker
Change the default settings for all date pickers
Example:
Set all date pickers to open on focus or a click on an icon.
$.datepicker.setDefaults({showOn: 'both', buttonImageOnly: true, buttonImage: 'calendar.gif', buttonText: 'Calendar'});
Example:
Set all date pickers to have French text.
$.datepicker.setDefaults($.datepicker.regional['fr']);
-
shadow( Options options ) returns jQuery
Add a drop shadow to the matched elements.
Options
Example:
Adds a drop shadow to the example element.
$("#example").shadow();
HTML:
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)"> <script src="http://dev.jquery.com/view/trunk/plugins/dimensions/jquery.dimensions.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.shadow.js"></script> <img id="example" style="height: 100px;" src="http://dev.jquery.com/view/trunk/plugins/ui/demos/images/resizable.jpg" />
-
shadowDestroy( ) returns jQuery
Destroys all shadows attached to the current jQuery elements.
Destroys all shadows on the current elements. Cannot be reverted. -
shadowDisable( ) returns jQuery
Disables shadows.
Temporarily disables shadows on the current jQuery. Can be re-enabled again later on. -
shadowEnable( ) returns jQuery
Enables shadows.
Re-enables shadows on the jQuery supplied that has been disabled before. -
showFor( Element target ) returns Datepicker
Call up a previously attached date picker.
Example:
Bring up the date picker for an input field.
$.datepicker.showFor('#invokeFocus');
-
slider( Options options ) returns
Makes a slider from the nodeset supplied by the query.
With this plugin, you can generate sliders with a wide range of options, including multiple handles, callbacks and more.Options
Example:
A simple jQuery UI Accordion.
$("#example").slider();
HTML:
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)"> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/dimensions/jquery.dimensions.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/ui/ui.mouse.js"></script> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/plugins/ui/ui.slider.js"></script> <div id='example' class='ui-slider-1' style="margin:10px;"> <div class='ui-slider-handle'></div> </div>
-
sortable( Options options ) returns
Creates new sortable on the nodeset supplied by the query.
This jQuery plugin makes DOM nodes sortable by mouse. You can additionally supply a great range of options to make them fit your needs.Options
Example:
Basic Example of a sortable.
$("#myList").sortable({});
HTML:
<script src="http://dev.jquery.com/view/trunk/plugins/dimensions/jquery.dimensions.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.mouse.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.draggable.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.droppable.js"></script> <script src="http://dev.jquery.com/view/trunk/plugins/ui/ui.sortable.js"></script> <ul id="myList"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> </ul>
-
sortableDestroy( ) returns jQuery
Destroys all sortable functionality in the current jQuery.
-
tablesorter( Options options ) returns jQuery
Create a sortable table with multi-column sorting capabilities.
Options
Example:
A simple Table Sorter.
$("#example").tablesorter({sortList:<a href='0,0],[2,1'>0,0],[2,1</a>, widgets: ['zebra']});
HTML:
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)"> <script src="http://dev.jquery.com/view/trunk/plugins/tablesorter/2.0/jquery.tablesorter.js"></script> <table id="example" class="tablesorter" border="0" cellpadding="0" cellspacing="1"> <thead> <tr> <th>First Name</th> <th>Last Name</th> <th>Age</th> <th>Total</th> <th>Discount</th> <th>Date</th> </tr> </thead> <tbody> <tr> <td>Peter</td> <td>Parker</td> <td>28</td> <td>$9.99</td> <td>20%</td> <td>Jul 6, 2006 8:14 AM</td> </tr> <tr> <td>John</td> <td>Hood</td> <td>33</td> <td>$19.99</td> <td>25%</td> <td>Dec 10, 2002 5:14 AM</td> </tr> <tr> <td>Clark</td> <td>Kent</td> <td>18</td> <td>$15.89</td> <td>44%</td> <td>Jan 12, 2003 11:14 AM</td> </tr> <tr> <td>Bruce</td> <td>Almighty</td> <td>45</td> <td>$153.19</td> <td>44%</td> <td>Jan 18, 2001 9:12 AM</td> </tr> <tr> <td>Bruce</td> <td>Evans</td> <td>22</td> <td>$13.19</td> <td>11%</td> <td>Jan 18, 2007 9:12 AM</td> </tr> </tbody> </table>
-
tabs( Number initial, Options options ) returns jQuery
The method that you use to create a new tabs interface.
Options
Example:
A simple jQuery UI Tabbed pane.
$("#example > ul").tabs();
HTML:
<link rel="stylesheet" href="http://dev.jquery.com/view/trunk/themes/flora/flora.all.css" type="text/css" media="screen" title="Flora (Default)"> <script type="text/javascript" src="http://dev.jquery.com/view/trunk/ui/current/ui.tabs.js"></script> <div id="example" class="flora"> <ul> <li><a href="#fragment-1"><span>One</span></a></li> <li><a href="#fragment-2"><span>Two</span></a></li> <li><a href="#fragment-3"><span>Three</span></a></li> </ul> <div id="fragment-1"> <p>First tab is active by default:</p> <pre><code>$('#example > ul').tabs();</code></pre> </div> <div id="fragment-2"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </div> <div id="fragment-3"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </div> </div>
Example:
Builds a tabs interface with second tab selected on initialization.
$('.selector').tabs(2);
Example:
Builds a tabs interface with some additional options.
$('.selector').tabs({ cache: true });
Example:
Builds a tabs interface with second tab selected on initialization and some additional options.
$('.selector').tabs(2, { cache: true });
-
tabsAdd( String url, String title, Number position ) returns jQuery
The method that you use to add a new tab to a tabs interface.
The selector must be the same as the one that was used for tabs initialisation, e.g. must match or can be the ul/ol element.Example:
Adds a new inline tab at the end.
$(".selector").tabsAdd('#new-tab', 'New Tab');
Example:
Inserts a new inline tab at the second position.
$(".selector").tabsAdd('#new-tab', 'New Tab', 2);
Example:
Adds a new remote tab at the end.
$(".selector").tabsAdd('/path/to/foo.php', 'New Tab');
-
tabsClick( Number position ) returns jQuery
The method that you use to simulate a click on tab in a tabs interface.
The selector must be the same as the one that was used for tabs initialisation, e.g. must match or can be the ul/ol element. -
tabsDisable( Number position ) returns jQuery
The method that you use to disable a tab in a tabs interface.
The selector must be the same as the one that was used for tabs initialisation, e.g. must match or can be the ul/ol element. -
tabsEnable( Number position ) returns jQuery
The method that you use to enable a tab in a tabs interface.
The selector must be the same as the one that was used for tabs initialisation, e.g. must match or can be the ul/ol element. -
tabsHref( Number position, String url ) returns jQuery
The method that you use to set a new URL for a remote (Ajax) tab in a tabs interface.
The selector must be the same as the one that was used for tabs initialisation, e.g. must match or can be the ul/ol element. -
tabsLoad( Number position, String url ) returns jQuery
The method that you use to reload a remote (Ajax) tab in a tabs interface.
The selector must be the same as the one that was used for tabs initialisation, e.g. must match or can be the ul/ol element. -
tabsRemove( Number position ) returns jQuery
The method that you use to remove a tab from a tabs interface.
The selector must be the same as the one that was used for tabs initialisation, e.g. must match or can be the ul/ol element. -
tabsRotate( Number milliseconds ) returns jQuery
A method that you use to set up an automatic rotation through tabs of a tab pane.
The selector must be the same as the one that was used for tabs initialisation, e.g. must match or can be the ul/ol element. Rotation stops if a tab is clicked on. To stop the rotation programmatically call this method without any or some falsy argument, like 0 or null.Example:
Start rotation with an interval of 5 seconds.
$(".selector").tabsRotate(5000);
Example:
Stop rotation.
$(".selector").tabsRotate(null);
-
tabsSelected( ) returns Number
Retrieve the position of the currently selected tab of the first matched tabs interface (no zero-based index).
The selector must be the same as the one that was used for tabs initialisation, e.g. must match or can be the ul/ol element. Returns -1 if no tab is currently selected.