Professional jQuery™ by Cesar Otero & Rob Larsen
Author:Cesar Otero & Rob Larsen
Language: eng
Format: epub
Publisher: John Wiley & Sons
Published: 2012-03-01T16:00:00+00:00
Table 8-5 lists some of the options available when working with $.tabs(). For the full list of options, see the documentation at http://jqueryui.com/demos/tabs/
Table 8.5: Tab Options
OPTION ACCEPTS DESCRIPTION
disabled Boolean An array containing the position of the tabs that should be disabled when the widget is initialized.
event String The event used for selecting a tab. This commonly allows tabs to change on mouseover instead of a standard click.
fx Options, Array fx allows you to set animations for showing and hiding tab content.
panelTemplate String If you’re using Ajax tabs, then you can use panelTemplate to create default HTML from which the new tab panels will be generated.
selected Number This zero-based integer sets the position of the initially selected tab.
spinner String An HTML string used to display a “spinner” or some other indication that the tab panel is loading. Requires a span in the a tag of the title.
tabTemplate String The HTML template from which new tabs are generated.
Accordion
Accordion widgets, similarly to tabs, are a great way to display and categorize a large amount of information. This widget is an expandable/collapsible box. It’s not meant to have all of its content expanded at the same time, but rather to display one “slice” of content at a time.
Table 8-6 illustrates the various accordion methods.
Table 8.6: Available $.accordion Methods
METHOD DESCRIPTION
$(selector).accordion(); Initializes an accordion widget.
$(selector).accordion( “destroy” ); Removes the accordion widget completely. This option rolls the selected element back to its initial state.
$(selector).accordion( “disable” ); Disables the accordion widget.
$(selector).accordion( “enable” ); Enables the accordion widget.
$(selector).accordion( “option” , optionName , [value] ); Get or set any accordion option. If the third argument is omitted, acts as a getter. Otherwise, it sets the optionName with the provided value.
$(selector).accordion( “widget” ); Returns the .ui-accordion element.
$(selector).accordion( “activate” , index ); Activates a content part of the accordion widget. The index indicates the zero-indexed number matching the position of the header to close or a selector matching an element.
$(selector).accordion( “resize” ); Recomputes the heights of the accordion widget contents.
The required markup for an accordion is a div with nested headers, where each header contains a link. The content is placed in a nested div following the header, as the following example illustrates:
<!DOCTYPE html> <html> <head> <link href=”css/ui-lightness/jquery-ui-1.8.13.custom.css” rel=”stylesheet” /> <script src=“http://code.jquery.com/jquery-1.7.1.js”></script> <script src=”js/jquery-ui-1.8.13.custom.min.js”></script> <script $(function() { $( “#accordion” ).accordion(); }); </script> </head> <body> <div id=”accordion”> <h3><a href=”#”>First header</a></h3> <div>First content</div> <h3><a href=”#”>Second header</a></h3> <div>Second content</div> </div> </body> </html>
Code snippet is from accordion.txt
Download
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.
Deep Learning with Python by François Chollet(15946)
The Mikado Method by Ola Ellnestam Daniel Brolund(13212)
Hello! Python by Anthony Briggs(13040)
OCA Java SE 8 Programmer I Certification Guide by Mala Gupta(12226)
Dependency Injection in .NET by Mark Seemann(12071)
Algorithms of the Intelligent Web by Haralambos Marmanis;Dmitry Babenko(10843)
The Well-Grounded Java Developer by Benjamin J. Evans Martijn Verburg(10663)
A Developer's Guide to Building Resilient Cloud Applications with Azure by Hamida Rebai Trabelsi(10537)
Grails in Action by Glen Smith Peter Ledbrook(10140)
Secrets of the JavaScript Ninja by John Resig Bear Bibeault(10029)
Sass and Compass in Action by Wynn Netherland Nathan Weizenbaum Chris Eppstein Brandon Mathis(9480)
Hit Refresh by Satya Nadella(9040)
Kotlin in Action by Dmitry Jemerov(8745)
Test-Driven iOS Development with Swift 4 by Dominik Hauser(8649)
The Kubernetes Operator Framework Book by Michael Dame(8485)
Exploring Deepfakes by Bryan Lyon and Matt Tora(8306)
Robo-Advisor with Python by Aki Ranin(8261)
Practical Computer Architecture with Python and ARM by Alan Clements(8232)
Implementing Enterprise Observability for Success by Manisha Agrawal and Karun Krishnannair(8202)