Jquery sibling, clicked and did not respond. I don't know what the problem is.

the effect you need to achieve is to click on a link and add class= "on"

to .bofangqi dd div. The code written by

is as follows:

 $(".bofangqi dd").on("click",function(){
        $(this).find("div").addClass("on").siblings.find("div").removeClass("on");
    })

but can not achieve the effect, do not know what the problem is?

<dl class="bofangqi" name="same-video-1-data">
    <dd>
        <div class="on"><span class="line">
        <a href="/highlight/basket/exu2.html" target="_self"> </a> 
        </span></div>
    </dd>
    <dd>
        <div><span class="line">
        <a href="/highlight/basket/exu0.html" target="_self">  1</a> 
        </span></div>
    </dd>
    <dd>
        <div><span class="line">
        <a href="/highlight/basket/exux.html" target="_self">320</a> 
        </span></div>
    </dd>
    
</dl>
Feb.27,2021

siblings is followed by parentheses:. Siblings ()


$(".bofangqi dd"). On ("click", function () {

)
$(this).find("div").addClass('on').siblings("div").removeClass("on");

})

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