i would like to generate dynamic tabs. so anchor tags will not have id also div tags wont have id.
this is what i try to do but it doesn't work.
<script>
$(function () {
$("#tabs").tabs();
$("#tabs ul.super li a").each(function (index) {
$(this).click(function () {
$("#tabs").tabs("select", index);
});
});
});
</script>
<div id="tabs">
<ul class="super">
<li><a>title 1</a></li>
<li><a>title 2 </a></li>
</ul>
<div>
content1
</div>
<div>
content2
</div>
</div>
How can i make it work like that?
Using the Nuri Yilmaz's code above, here it is a jquery plugin making tabs using no id at all:
It is workind code. Dynamicaly add tab's and a's