B
B
blockso2018-11-04 01:01:44
JavaScript
blockso, 2018-11-04 01:01:44

How to change class from false to true in Vue?

Hello. Tell me, please, how to change the class in View from false to true after 4 seconds?

var body = new Vue({
  el:'#main',
  data:{
    active_color: false
  },
  methods:{
    ChangeColor: function(){
          setTimeout(()=>{
          	this.active_color = true;
          },40000)
    }
  }
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2018-11-04
@blockso

Actually, it works fine. https://jsfiddle.net/L0ay4jwh/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question