5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>jQuery Mobile Docs - Collapsible Content</title>
7 <link rel="stylesheet" href="../../css/themes/default/jquery.mobile.css" />
8 <link rel="stylesheet" href="../_assets/css/jqm-docs.css"/>
10 <script src="../../js/jquery.js"></script>
11 <script src="../../docs/_assets/js/jqm-docs.js"></script>
12 <script src="../../js/"></script>
17 <div data-role="page" class="type-interior">
19 <div data-role="header" data-theme="f">
21 <a href="../../" data-icon="home" data-iconpos="notext" data-direction="reverse">Home</a>
22 <a href="../nav.html" data-icon="search" data-iconpos="notext" data-rel="dialog" data-transition="fade">Search</a>
23 </div><!-- /header -->
25 <div data-role="content">
26 <div class="content-primary">
27 <h2>Collapsible content</h2>
29 <ul data-role="controlgroup" data-type="horizontal" class="localnav">
30 <li><a href="content-collapsible.html" data-role="button" data-transition="fade">Basics</a></li>
31 <li><a href="content-collapsible-options.html" data-role="button" data-transition="fade">Options</a></li>
32 <li><a href="content-collapsible-methods.html" data-role="button" data-transition="fade">Methods</a></li>
33 <li><a href="content-collapsible-events.html" data-role="button" data-transition="fade" class="ui-btn-active">Events</a></li>
36 <p>Bind events directly to the container, typically a <code>div</code> element. Use jQuery Mobile's <a href="../api/events.html">virtual events</a>, or bind standard JavaScript events, like change, focus, blur, etc.:</p>
38 $( ".selector" ).bind( "collapse", function(event, ui) {
43 <p>The collapsible plugin has the following custom events:</p>
47 <dt><code>create</code> triggered when a collapsible is created</dt>
51 $( ".selector" ).collapsible({
52 create: function(event, ui) { ... }
57 <dt><code>collapse</code> triggered when a collapsible is collapsed</dt>
61 $( ".selector" ).collapsible({
62 collapse: function(event, ui) { ... }
67 <dt><code>expand</code> triggered when a collapsible is expanded</dt>
71 $( ".selector" ).collapsible({
72 expand: function(event, ui) { ... }
79 </div><!--/content-primary -->
81 <div class="content-secondary">
83 <div data-role="collapsible" data-collapsed="true" data-theme="b" data-content-theme="d">
85 <h3>More in this section</h3>
87 <ul data-role="listview" data-theme="c" data-dividertheme="d">
89 <li data-role="list-divider">Content Formatting</li>
90 <li><a href="content-html.html">Basic HTML styles</a></li>
91 <li><a href="content-grids.html">Layout grids (columns)</a></li>
92 <li data-theme="a"><a href="content-collapsible.html">Collapsible content blocks</a></li>
93 <li><a href="content-collapsible-set.html">Collapsible sets (accordions)</a></li>
94 <li><a href="content-themes.html">Theming content</a></li>
100 </div><!-- /content -->
102 <div data-role="footer" class="footer-docs" data-theme="c">
103 <p>© 2011-12 The jQuery Foundation</p>