Changeset 3154
- Timestamp:
- 09/08/07 18:31:53 (2 years ago)
- Location:
- trunk/plugins/ui/tests
- Files:
-
- 2 modified
-
ahah_1.html (modified) (1 diff)
-
tabs.html (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/plugins/ui/tests/ahah_1.html
r3088 r3154 1 1 <p>Load tab content dynamically via Ajax</p> 2 <pre><code>$('#container').tabs({ remote: true });</code></pre> 2 <pre><code>$('#container').tabs(); // detect automatically 3 $('#container').tabs({ cache: true }); // load once, then cache</code></pre> -
trunk/plugins/ui/tests/tabs.html
r3150 r3154 141 141 <div id="fragment-1"> 142 142 <p>First tab is active by default:</p> 143 <pre><code>$( '#container').tabs();</code></pre>143 <pre><code>$('#container').tabs();</code></pre> 144 144 </div> 145 145 <div id="fragment-2"> … … 167 167 <div id="fragment-5"> 168 168 <p>Second tab is active:</p> 169 <pre><code>$( '#container').tabs(2);</code></pre>169 <pre><code>$('#container').tabs(2);</code></pre> 170 170 <p> 171 171 Two alternative ways to specify the active tab will overrule this argument. First a li element … … 200 200 in milliseconds. If omitted it defaults to <code>normal</code>. 201 201 </p> 202 <pre><code>$( '#container').tabs({ fxSlide: true });</code></pre>202 <pre><code>$('#container').tabs({ fxSlide: true });</code></pre> 203 203 </div> 204 204 <div id="fragment-8"> … … 229 229 in milliseconds. If omitted it defaults to <code>normal</code>. 230 230 </p> 231 <pre><code>$( '#container').tabs({ fxFade: true, fxSpeed: 'fast' });</code></pre>231 <pre><code>$('#container').tabs({ fxFade: true, fxSpeed: 'fast' });</code></pre> 232 232 </div> 233 233 <div id="fragment-11"> … … 252 252 <div id="fragment-13"> 253 253 <p>Use a combined slide and fade effect to switch tabs:</p> 254 <pre><code>$( '#container').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'fast' });</code></pre>254 <pre><code>$('#container').tabs({ fxSlide: true, fxFade: true, fxSpeed: 'fast' });</code></pre> 255 255 </div> 256 256 <div id="fragment-14"> … … 283 283 tabs requires form validation before for example. 284 284 </p> 285 <pre><code>$('#container').tabs({ 286 fxFade: true, 287 fxSpeed: 'fast', 285 <pre><code>$('#container').tabs({ 288 286 click: function() { 289 alert(' onClick');287 alert('click callback'); 290 288 }, 291 289 hide: function() { 292 alert(' onHide');290 alert('hide callback'); 293 291 }, 294 292 show: function() { 295 alert(' onShow');293 alert('show callback'); 296 294 } 297 295 });</code></pre> … … 318 316 <div id="fragment-19"> 319 317 <p>Define your own custom animation:</p> 320 <pre><code>$( '#container').tabs({ fxShow: { height: 'show', opacity: 'show'} });</code></pre>318 <pre><code>$('#container').tabs({ fxShow: { height: 'show', opacity: 'show' } });</code></pre> 321 319 </div> 322 320 <div id="fragment-20"> … … 349 347 </ul> 350 348 <div id="fragment-22"> 351 <pre><code>$('#container').enableTab(3); // enables third tab 352 $('#container').triggerTab(3); // triggers third tab 353 $('#container').disableTab(3); // disables third tab</code></pre> 354 <p> 355 One or more tabs can also be disabled immediatly by simply setting the disabling class for the li element 349 <pre><code>$('#container').clickTab(3); // simulate click on 3rd tab 350 $('#container').enableTab(3); // enable 3rd tab 351 $('#container').disableTab(3); // disable 3rd tab 352 $('#container').addTab('#new-tab', 'New Tab', 4); // add new 4th tab 353 $('#container').removeTab(4); // remove 4th tab</code></pre> 354 <p> 355 One or more tabs can also be disabled immediatly by simply setting the disabling class for the <code class="html">li</code> element 356 356 representing that particular tab or by using the <code>disabled</code> option. 357 357 </p> 358 358 <pre><code><li class="tabs-disabled">…</li> 359 359 360 $( '#container').tabs({ disabled: [2, 3] });</code></pre>360 $('#container').tabs({ disabled: [2, 3] });</code></pre> 361 361 </div> 362 362 <div id="fragment-23"> … … 380 380 </ul> 381 381 <div id="fragment-25"> 382 <p>Define your own custom animation:</p> 383 <pre><code>$('#container').tabs({ unselected: true }); // start with all tabs hidden 384 $('#container').tabs({ toggle: true }); // selected tab closes on click</code></pre> 385 <p> 386 Setting unselected option to true automatically sets toggle as well. 382 <pre><code>$('#container').tabs({ unselected: true }); // start with all tabs hidden 383 $('#container').tabs({ unselect: true }); // selected tab closes on click</code></pre> 384 <p> 385 Setting <code class="javascript">unselected</code> option to <code class="javascript">true</code> automatically sets <code class="javascript">unselect</code> as well. 387 386 </p> 388 387 </div> … … 408 407 <div id="fragment-28"> 409 408 <p>Define mouseover event to switch tabs (or any other reasonable event)</p> 410 <pre><code>$( '#container').tabs({ event: 'mouseover' });</code></pre>409 <pre><code>$('#container').tabs({ event: 'mouseover' });</code></pre> 411 410 </div> 412 411 <div id="fragment-29">
