• A
  • B
  • C" />
    • A
    • B
    • C" />
      • A
      • B
      • C"/>

        TechQA.

        jQuery UI Tabs Widget and Nested list

        2.3k views Asked by ai2517 At 2013-10-29T19:03:03+00:00 29 October 2013 at 19:03 2025-12-22T11:33:17+00:00

        I have following nested tabs that I want to show in

        <div id="1">
        <ul>
            <li><a href="#a">A</a></li>
            <li><a href="#aa1c">B</a></li>
            <li><a href="#aa2c">C</a></li>
        </ul>
        <div id="a">
        
            <div id="aa1h">
                Sub Tab AA1 Header
            </div>
            <div id="aa1c">
                Sub Tab AA1 Content 
            </div>        
            <div id="aa2h">
                Sub Tab AA2 Header
            </div>
            <div id="aa2c">
                Sub Tab AA2 Content 
            </div>       
        
         </div>
        </div>
        
        
        $('#1').tabs();
        

        Now I want to display three tabs using jQuery tabs or YUI tabview as following:

        First tab displays #a (the whole thing) Second tab displays #aa1c (only content for aa1) Third tab displays #aa2c (only content for aa2)

        I am having some problems with this method, any help is appreciated.

        http://jsfiddle.net/RQcwE/1/

        See above example for my problem.

        UPDATE:

        With help from Hanlet Escaño I have achieved what I wanted with couple of blank divs and some jQuery Code..

        http://jsfiddle.net/RQcwE/3/

        yui jquery-ui-tabs jquery-1.10
        Original Q&A
        1

        There are 1 answers

        1
        Hanlet Escaño Hanlet Escaño On 2013-10-29T19:17:55+00:00 29 October 2013 at 19:17 BEST ANSWER

        This is an example with sub-tabs that might work for you:

        <div id="1">
            <ul>
                <li><a href="#a">A</a></li>
                <li><a href="#b">B</a></li>
                <li><a href="#c">C</a></li>
            </ul>
            <div id="a">
                <ul>
                    <li><a href="#aa1">Sub A 1</a></li>
                    <li><a href="#aa2">Sub A 2</a></li>
                </ul>
                <div id="aa1">
                    Sub Tab A content 1
                </div>
                <div id="aa2">
                    Sub Tab A content 2
                </div>
             </div>
            <div id="b">
                <ul>
                    <li><a href="#bb1">Sub B 1</a></li>
                    <li><a href="#bb2">Sub B 2</a></li>
                </ul>
                <div id="bb1">
                    Sub Tab B content 1
                </div>
                <div id="bb2">
                    Sub Tab B content 2
                </div>
             </div>
            <div id="c">
                <ul>
                    <li><a href="#cc1">Sub C 1</a></li>
                    <li><a href="#cc2">Sub C 2</a></li>
                </ul>
                <div id="cc1">
                    Sub Tab C content 1
                </div>
                <div id="cc2">
                    Sub Tab C content 2
                </div>
             </div>
        </div>
        

        you just build them like this:

        $("#1" ).tabs();
        $("#a" ).tabs();
        $("#b" ).tabs();
        $("#c" ).tabs();
        

        JSFiddle: http://jsfiddle.net/p84kC/

        Related Questions in YUI

        • Having trouble clicking on Yahoo UI (YUI) checkbox with selenium
        • YUI3 Get children of a element
        • How to enable a checkbox using AUI script
        • How to use Yahoo YUI in SuiteCRM
        • Run Code After Squarespace Popup Event Listener/Trigger
        • YUI (YAHOO) blocking my UI when i show the panel
        • Page layout rendered differently on github-pages
        • Set Default SquareSpace Product Variants failing to get YUI element
        • how to set aria-readonly to false for a table using jquery? i want to wrap the <td> inside <span> in document.rady function
        • Why do I get the error Y Not Defined Error in Squarespace
        • Change a datatable cell value to an input text with YUI
        • Show Data in grid from DataSource in YUI?
        • How to bundle js/css in legacy java web application
        • Override Javascript Function Expression
        • array of callbacks as Promise?

        Related Questions in JQUERY-UI-TABS

        • Dynamically created jQuery Tabs on ColdFusion Pages
        • jquery tabs sometimes set the iframe height to zero
        • How to activate the parent tab content using javascript?
        • jQuery UI tabs using aria-controls instead of title to have a single panel
        • Remember last clicked tab on page refresh
        • Uncaught Error: Method load does not exist on jQuery.tabs
        • How to integrate JqueryUI Tabs in Blazor webAssembly application
        • Load Php Page Inside Jquery Chrome Tabs
        • Jquery tab navigation not working properly
        • jquery-ui tab "Interactive controls must not be nested"
        • Jquery tab not showing first child selected
        • Reactjs Dynamically call components having cards under tabpanels using array
        • How to manipulate Bootstrap tabs from another page using Ajax
        • link to a page with tabbed content doesnt work
        • I want a single page scroll with top nav menu scroll and active (Active menu should be in first position scroll)

        Related Questions in JQUERY-1.10

        • Collapse button is showing but not working after click in bootstrap 3.3 and jquery 1.1
        • jquery children function stopped working out of the blue - possible depreciation
        • JavaScript queries are not working at all but work when inserted in jquery 1.10.0 file
        • Get landmarks nearby given coordinate in Javascript Asynchronously
        • Uncaught TypeError: Cannot read property 'prop' of undefined in toggle functionality
        • How to call a jQuery DataTable object in an iframe?
        • Same code acts differently on website and jsfiddle
        • using jquery-1.10.2.min and jquery-1.7.1.min in one template
        • JQuery Version issue with Internet Explorer Version 11 , IE 11
        • $.ajax To Failure: or not to Failure:
        • Delay detecting collision with translate3d and jQuery
        • MVC PartialViewResult contains Attached JavaScript function calls, causing memory leak
        • In what case does jQuery sortable fail silently?
        • jCarousel not calculating width properly with newer jQuery version 1.10.2
        • jQuery UI Tabs Widget and Nested list

        Popular Questions

        • How do I undo the most recent local commits in Git?
        • How can I remove a specific item from an array in JavaScript?
        • How do I delete a Git branch locally and remotely?
        • Find all files containing a specific text (string) on Linux?
        • How do I revert a Git repository to a previous commit?
        • How do I create an HTML button that acts like a link?
        • How do I check out a remote Git branch?
        • How do I force "git pull" to overwrite local files?
        • How do I list all files of a directory?
        • How to check whether a string contains a substring in JavaScript?
        • How do I redirect to another webpage?
        • How can I iterate over rows in a Pandas DataFrame?
        • How do I convert a String to an int in Java?
        • Does Python have a string 'contains' substring method?
        • How do I check if a string contains a specific word?

        Trending Questions

        • UIImageView Frame Doesn't Reflect Constraints
        • Is it possible to use adb commands to click on a view by finding its ID?
        • How to create a new web character symbol recognizable by html/javascript?
        • Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
        • Heap Gives Page Fault
        • Connect ffmpeg to Visual Studio 2008
        • Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
        • How to avoid default initialization of objects in std::vector?
        • second argument of the command line arguments in a format other than char** argv or char* argv[]
        • How to improve efficiency of algorithm which generates next lexicographic permutation?
        • Navigating to the another actvity app getting crash in android
        • How to read the particular message format in android and store in sqlite database?
        • Resetting inventory status after order is cancelled
        • Efficiently compute powers of X in SSE/AVX
        • Insert into an external database using ajax and php : POST 500 (Internal Server Error)
        • Privacy
        • Terms
        • Cookies
        • Homegardensmart
        • Math
        • Aftereffectstemplates