[Vuejs]-Bound class not applying in javascript transition

2👍

are you using this with jQuery? Only it looks like this.visible is out of scope when you try and set it:

slideFadeIn(el, done) {
  $(el).slideDown( function() {
    this.visible = true; // this wouldn't be the vm anymore
  })
},

I appreciate you said the value of visible was correct, but this doesn’t look like it would work so not sure how that’s being set …

does it help if you:

slideFadeIn(el, done) {
  var vm = this
  $(el).slideDown(function() {
    vm.visible = true; // this wouldn't be the vm anymore
  })
},
👤GuyC

Leave a comment