vue toggle class
<template>
<div>
<div
class="staticClass"
v-bind:class="{ active: isActive, 'text-danger': hasError }"
></div>
<!-- OR -->
<div
v-bind:class="[isActive ? activeClass : '', errorClass]"
></div>
</div>
</template>
<script>
export default {
data() {
isActive: true,
hasError: false,
activeClass: 'active',
errorClass: 'text-danger',
}
}
</script>
Also in HTML:
- html submit button
- let's encrypt ssl not working
- html set input type date to disable previous dates
- how to put an image in html
- how to customize link text in html
- table bootstrap with scrool
- new line html
- jquery
- html href to gmail
- how to get number list in html
- excel vba HTML text with tags to formatted text in an cell
- html remove hittest from element
- how to make a html login
- embed youtube video auto height
- how To fetch the index of dropdown in html
- set default value of a multiselect in html
- meta tags
- html image
- how to substract date object javascript
- change header color html
- jquery replace innerhtml
- install ubuntu in vmware
- html input default value
- m3u8 ffmpeg download