Newbie: How to build dynamic jQuery tab from javascript?

Newbie: How to build dynamic jQuery tab from javascript?

Hi,

The question is simple. How can I build dynamic Tabs from javascript?

The result is not the same as placing the very same markup in html.

I have made this fiddle to show you what I mean: http://jsfiddle.net/9e4ruq5f/

What am I doing wrong?