Note that there are some explanatory texts on larger screens.

plurals
  1. POMake a new set of working tabs and panes for another div
    primarykey
    data
    text
    <p>This is my css:</p> <pre><code>ul.tabs { list-style:none; margin: 0!important; padding:0; border-bottom:0px solid #666; height:30px; } /* single tab */ ul.tabs li { float:left; text-indent:0; padding:0; margin:0 !important; list-style-image:none !important; } /* link inside the tab. uses a background image */ ul.tabs a { background-color: #000000; font-size:12px; display:block; height: 30px; line-height:30px; width: 134px; text-align:center; text-decoration:none; color:#FFFFFF; padding:0px; margin:0px; position:relative; background-image: url(); background-repeat: no-repeat; background-position: -420px 0; font-family: arial; font-weight: bold; text-transform: uppercase; } ul.tabs a:active { outline:none; } /* when mouse enters the tab move the background image */ ul.tabs a:hover { background-position: -420px -31px; color:#fff; } /* active tab uses a class name "current". its highlight is also done by moving the background image. */ ul.tabs a.current, ul.tabs a.current:hover, ul.tabs li.current a { background-position: -420px -62px; cursor:default !important; color:#000 !important; } /* initially all panes are hidden */ .panes .pane { display:none; } .panes div { display:none; padding:15px 10px; border:medium solid #000000; height:150px; font-size:14px; background-color: #0099FF; } </code></pre> <p>This is my HTML:</p> <pre><code>&lt;div class="panes"&gt; &lt;div&gt;working pane 1&lt;/div&gt; &lt;div&gt;working pane 2&lt;/div&gt; &lt;div&gt;working pane 3&lt;/div&gt; &lt;/div&gt; &lt;ul class="tabs"&gt; &lt;li&gt;&lt;a href="#"&gt;Working Tab1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Working Tab2&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;Working Tab3&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;p&gt; &lt;div class="Next Set of Tabs I want to work"&gt; &lt;ul class="tabs"&gt; &lt;li&gt;&lt;a href="#"&gt;tab 1&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#"&gt;tab 2&lt;/a&gt;&lt;/li&gt; &lt;/ul&gt; &lt;div class="Next Set of Panes I want to work"&gt; &lt;div&gt;member pane 1&lt;/div&gt; &lt;div&gt;member pane 2&lt;/div&gt; &lt;div&gt;member pane 3&lt;/div&gt; &lt;/div&gt; &lt;/div </code></pre> <p>and this is my javascript:</p> <pre><code>// perform JavaScript after the document is scriptable. $(function() { // setup ul.tabs to work as tabs for each div directly under div.panes $("ul.tabs").tabs("div.panes &gt; div"); }); &lt;/script&gt; </code></pre> <p>How do I create a 2nd and 3rd set of tabs and panes that I can use elsewhere in my document? Ive tried some edits of my own but I failed miserably. </p> <p>Also, what changes do I have to make to my javascript so that it will work for the added tabs and panes in addition to the current one?</p> <p>Please reply with example in code. Thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload