Generate jquery tabs on button press
<p>I'm trying to generate tabs (that can also be closed) at the press of a button containing a div. Currently what I'm using to generate the div is:</p>

<pre><code>function addStream(name) {

    if ($("#stream_"+name)[0]!=null) { return; };
    var d=$("&lt;div&gt;&lt;/div&gt;");
    $(d).attr("id", "stream_"+name);
    $(d).attr("class", "container_small");
    $(d).append("&lt;iframe width='560' height='340' style='border: 0; outline=0' frameborder='0' scrolling='no' src='http://cdn.livestream.com/embed/"+name+"?layout=4&amp;amp;height=340;width=560&amp;amp;autoplay=false'&gt;&lt;/iframe&gt;");
    $(d).append("&lt;iframe width='300' height='340' style='border: 0; outline=0' frameborder='0' scrolling='no' src='http://cdn.livestream.com/embed/"+name+"?layout=6&amp;amp;height=400&amp;amp;width=300&amp;amp;showTimestamp=true'&gt;&lt;/iframe&gt;");
    $(d).append("&lt;br&gt;&lt;div style=\"display: inline-block; margin: 4px;\"&gt;&lt;input type=\"button\" value=\"close\" onclick='removeStream(\""+name+"\")'&gt;&lt;/input&gt;&lt;/div&gt;");
    $("#view").append(d);
}
</code></pre>

<p>Id just like this information inside of a close-able tab. Excuse my bare-basic knowledge; I'm still learning.</p>
