JSFiddle - React, Tailwind, and code Playground

by TeslaNick

HTML

<script src="http://yui.yahooapis.com/3.7.3/build/yui/yui-min.js"></script>
<!-- a YUI tabview -->
<div id="tb1" class="yui3-skin-sam">
    <ul>
        <li>
            <a href="#foo">foo</a>
        </li>        
    </ul>
    <div>
        <div id="foo">
             <button id="b1">button with problems</button>
        </div>
    </div>
</div>

<!-- a YUI button -->
<button id="b2">another plain html YUI button</button>

JavaScript

/*my problem with tabview is that if it contains widgets I always must render the tab view AFTER all the other widgets. This is not alwais desired....*/

YUI().use("tabview", "button", function(y){

    var tb = new y.TabView({srcNode: "#tb1"});
    tb.render(); 


    // Wait until after the tabview renders to scoop up the node refs            
    var button1El = y.one("#b1"); 
    var button2El = y.one("#b2"); 
    
    
    var button1 = new y.Button({srcNode: button1El}); 
    button1.render(); 
    
    var button2 = new y.Button({srcNode: "#b2"});
    button2.render(); 
    
    
});