[Vuejs]-Vue.js binding is hiding parent divs and elements (not intended)

2👍

The dash character in your CSS binding makes the name an invalid javascript property name so you need to enclose it in quotes:

v-bind:class="{ 'is-active': isActive }"

I suspect there might be something in your console highlighting this error.

UPDATE

Should have included my jsFiddle showing that your JS and HTML code works if the is-active is wrapped in quotes:

https://jsfiddle.net/psteele/mzjb8wvb/

Leave a comment