B
B
blockso2018-10-22 17:15:53
JavaScript
blockso, 2018-10-22 17:15:53

How to implement deleting a class with an interval of 2 seconds?

Hello. Please help me write the code. The bottom line is that you need to remove the opacity_deactivated class from each element with an interval of 2 seconds. Tell me how you can implement this idea.

var app = new Vue({
  el: '#header',
  data:{
    menuItems:[
        {
          url:'#',
          name:'Блог',
          isActive: true
        },
        {
          url:'#',
          name:'Обо мне',
          isActive: true
        },
        {
          url:'#',
          name:'Навыки',
          isActive: true
        },
        {
          url:'#',
          name:'Блог',
          isActive: true
        },
        {
          url:'#',
          name:'Услуги',
          isActive: true
        },
        {
          url:'#',
          name:'Портфолио',
          isActive: true
        },
        {
          url:'#',
          name:'Контакты',
          isActive: true
        }
    ]
  },
  methods:{
    activated: function(){
      this.menuItems.forEach
    }
  }

})

<ul class="header_navmenu" id="header">
            <li class="nav_menu-item" 
            v-for="menu_item in menuItems"
            :class="{ opacity_deactivated: menu_item.isActive }">
            <a v-bind:href="menu_item.url" target="_blank">{{ menu_item.name }}</a></li>
          </ul>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question