Why removeClass can't remove the class attribute

problem description: when you click .nav _ li, get the child element ul in .nav _ li, and then add the nav_li_on_2 class attribute to it. When I click on other peer buttons of .nav _ li, I will remove the class attribute added by ul in the current .nav _ li, but the following code can only be added and not deleted.

    <script type="text/javascript">
        // JS
        $(document).ready(function(){
            $(".nav_li").click(function(){
                $(this).find("ul").addClass("nav_li_on_2").siblings(".nav_li_on_2").removeClass("nav_li_on_2")
            })
        })
    </script>
Aug.09,2021

$(".nav_li").click(function(){
    $(this).find('ul').addClass("nav_li_on_2")
    $(this).siblings().find('ul').removeClass("nav_li_on_2")
})

print $(this). Find ('ul'). Siblings (' .nav _ li_on_2'), length is 0) means that


 $(this).find('ul').addClass("nav_li_on_2").siblings('.nav_li_on_2').removeClass("nav_li_on_2")
 //ulclass class ul  
 

siblings () is looking for a brother element. There is something wrong with the writing.

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-1b2b950-2ba9b.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-1b2b950-2ba9b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?