Answers for "vue js on checkbox show div"

0

vue js on checkbox show div

var app = new Vue({
        el: '#selector',
        data: {
            checked: false
        }
});


<script src="https://unpkg.com/vue/dist/vue.js"></script>
<body>
   <div id="selector">
    <div class="checkbox">
        <label><input type="checkbox" v-model="checked">Options</label>
    </div>
    <div class="container" id="app-container" v-if="checked">
        <p>Text is visible</p>
    </div>       
   </div>
</body>
Posted by: Guest on January-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language