Js/jq modifies some parameters to realize the function.

<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

.
Nov.24,2021

$("-sharpmyTabDrop2 .name").text($(".admin .drop-menu li").eq(0).text());
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eacd12-47eea.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eacd12-47eea.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?