roojs-all.js
[roojs1] / examples / tabs / tabs.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
5     <title>Tabs Example</title>
6     <link rel="stylesheet" type="text/css" href="../../css/roojs.css"/>
7     <link rel="stylesheet" type="text/css" href="../../css/xtheme-slate.css"/>
8
9      <script type="text/javascript" src="../../roojs-all.js"></script>   
10      
11  
12
13     <!-- Tabs Example Files -->
14     <link rel="stylesheet" type="text/css" href="tabs-example.css" />
15     <script type="text/javascript" src="tabs-example.js"></script>
16
17     <!-- Common Styles for the examples -->
18     <link rel="stylesheet" type="text/css" href="../examples.css" />
19 </head>
20 <body>
21 <script type="text/javascript" src="../examples.js"></script><!-- EXAMPLES -->
22
23 <h1>Tab Panel Examples</h1>
24 <p>Note that the js and css is not minified so it is readable. See <a href="tabs-example.js">tabs-example.js</a> for the tab creation code
25 and <a href="tabs-example.css">tabs-example.css</a> for the css.</p>
26
27     <h3>Tabs without fixed height that resize to the content. Built from existing markup.</h3><br>
28     <!-- container for the existing markup tabs -->
29     <div id="tabs1">
30         <div id="script" class="tab-content">
31         <b>Here's my script:</b>
32
33 <!-- pre sections lookup hideous -->
34 <pre>
35 var tabs = new Roo.TabPanel('tabs1');
36 tabs.addTab('script', "View Script");
37 tabs.addTab('markup', "View Markup");
38 tabs.activate('script');</pre>
39  <!-- end pre -->
40
41        </div>
42         <div id="markup" class="tab-content">
43
44 <!-- pre sections lookup hideous -->
45 <pre>
46 &lt;div id="tabs1"&gt;
47     &lt;div id="script" class="tab-content"&gt;
48         (Content goes here)
49     &lt;/div&gt;
50     &lt;div id="markup" class="tab-content"&gt;
51         (Content goes here)
52     &lt;/div&gt;
53 &lt;/div></pre>
54 <!-- end pre -->
55
56         </div>
57     </div>
58
59     <br>
60      <h3>Tabs with fixed height that scroll the content. Built entirely with javascript.</h3>
61     <ul class="list">
62     <li>Tab 1 is a normal tab with content passed when adding it.</li>
63     <li>Tab 2 is loaded via Ajax. It was set up using the standard UpdateManager functionality. It reloads it's content every time it's activated.</li>
64     <li>Tab 3 is loaded via Ajax too. It was set up using setUrl() a convenience method that will do everything done on tab 2 and also has the ability to set it to load only once.</li>
65     <li>Tab 4 has an event listener attached.</li>
66     <li>Tab 5 is disabled.</li>
67     </ul><br>
68
69     <!-- container for the pure JS tabs -->
70     <div id="jtabs" class="xp">
71     </div>
72
73 </body>
74 </html>