Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

forEach ActiveLink

        var list = document.querySelectorAll(".list");

        function activeLink() {
            list.forEach((item) =>
                item.classList.remove('active'));
            this.classList.add('active');
        }
        list.forEach((item) =>
            item.addEventListener('click', activeLink));
Comment

PREVIOUS NEXT
Code Example
Javascript :: _document getInitialProps req is undefined 
Javascript :: To disable server-to-server and REST tools like Postman to access our API - Remove !origin from your if statement. 
Javascript :: curl --post with api 
Javascript :: role based authentication in node js mongodb 
Javascript :: when i add data into the input it disappeared in react 
Javascript :: add link in react table to specific column 
Javascript :: setFocus() in searchbar ionic4 
Javascript :: javascript find in array cannot read property of undefined 
Javascript :: node js 42school 
Javascript :: how take a item from object javascript 
Javascript :: jquery ajax snippet 
Javascript :: How to Compare Strings Using Mathematical Operators 
Javascript :: jquery remove array of classes 
Javascript :: scroll to bottom of page javascript 
Javascript :: how to uitree clone in jquery 
Javascript :: Prototype Constructor Will Be Class or Function 
Javascript :: suitescript render transaction 
Javascript :: check first path of url js 
Javascript :: regex to allow spaces and characters 
Javascript :: Colored tab in react Js MUI 
Javascript :: react native leaflet 
Javascript :: javascript Program for sum of arithmetic series using loop 
Javascript :: routing with django and react 
Javascript :: async data nuxt multiple requests 
Javascript :: function Using onpause and onplay Method to Start and Stop Animationto replace source file path to jpg image 
Javascript :: copy text input javascript 
Javascript :: onScrollBottom 
Javascript :: configuring styled component to support ssr and hydration 
Javascript :: javascript loop through delimited string 
Javascript :: utm to lat long 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =