Js if there is a class called A, and there are many classes whose class is An on the page, how do you find out the An other than the current A?

if there is a class called An and there are many classes with class An on the page, how do you find out the An other than the current A?

<ul>
    <li class="A">
        <ul>
            <li class="A">
                
            </li>
            <li class="A">
                <ul>
                    <li class="A">
                        
                    </li>
                </ul>
            </li>
        </ul>
    </li>
    <li class="A" >
        
    </li>
</ul>

how do I find all An except the current element?

Mar.19,2021

//jq
var index = $('.A').index($(this))
console.log($('.A:not(:eq('+index+'))'))

this can use JS event delegate, currenttarget refers to the current element, and then you can bind the event to write if (event.target.tagName = = currentarget.tagName) {write the statement you want to execute in parentheses}
this way is called event proxy, also known as event delegate.


jq : $('div'). Not ($(' div'). Eq (1))
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-1b3ed80-2c43a.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-1b3ed80-2c43a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?