Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

vue ref add class

methods: {
    onClick(ref) {
      const activeClass = 'active-submenu'
      if (!this.$refs[ref].classList.length) {
        this.$refs[ref].classList.value = [activeClass]
      } else {
        this.$refs[ref].classList.value = ''
      }
    },
  },
Comment

PREVIOUS NEXT
Code Example
Javascript :: create subcollection firestore 
Javascript :: javascript copy an array 
Javascript :: delete item from list javascript 
Javascript :: open popup after 10 seconds javascript 
Javascript :: download image jquery onclick 
Javascript :: scroll to bottom of div javascript 
Javascript :: jquery page finished loading 
Javascript :: onclick event in angular 
Javascript :: js make value positive 
Javascript :: angular adding delay 
Javascript :: javascript print out 
Javascript :: comma in price js 
Javascript :: js get anchor 
Javascript :: javascript get local storage 
Javascript :: javascript explode 
Javascript :: import resolver path react 
Javascript :: gulp del 
Javascript :: js indexof nested array 
Javascript :: how to print an array in javascript 
Javascript :: link vs NavLink in React Router 
Javascript :: http get request js 
Javascript :: javascript click event notifications 
Javascript :: is javascript variable also an object 
Javascript :: javascript sleep function 
Javascript :: how to check whether a string contains a substring in typescript online 
Javascript :: ngrok react.js 
Javascript :: how to delete a folder in node js 
Javascript :: react detect screen size 
Javascript :: send file discord js v12 
Javascript :: get only one value from object array javascript 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =