<li class="drop admin active"> <a href="-sharp" id="myTabDrop2" class="dico-cl bluray"><span class="name">4</span><b class="caret"></b></a>
<ul class="drop-menu" role="menu" aria-labelledby="myTabDrop2">
<li><a class="dico-cl" href="-sharpcon_list_1">1</a></li>
<li><a class="dico-cl" href="-sharpcon_list_2">2</a></li>
<li><a class="dico-cl" href="-sharpcon_list_3">3</a></li>
<li><a class="dico-cl" href="-sharpcon_list_4">4</a></li>
</ul>
</li>
js
$(".admin .drop-menu li").click(function() {
var sclass = $(this).find("a").attr("class");
var stext = $(this).text();
$("-sharpmyTabDrop2 .name").text(stext);
$("-sharpmyTabDrop2").removeClass($("-sharpmyTabDrop2").attr("class"));
$("-sharpmyTabDrop2").addClass(sclass);
});
the 4 in < span class= "name" > 4 that appears by default becomes the 1 of the first li
.