1
I particularly love the Vue.js
.
With it it is possible to leave the dynamics of html rendering in real time. This example automates the content display process.
Now you just need to receive this data from an API without having to worry about changing the html document every time your database or API adds a new product.
var app = new Vue({
el: '#check',
data: {
checks: [
{label: 'APPLE' , values: ['IPHONE' , 'IPAD'] , check:false},
{label: 'LG' , values: ['TVs' , 'SMARTPHONES'] , check:false}
]
}
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.16/vue.min.js"></script>
<div id="check">
<div v-for="check in checks" >
<label >{{check.label}}</label>
<input type="checkbox" v-on:click="check.check = check.check == false ? true : false">
<select v-if="check.check">
<option v-for="value in check.values " v-bind:value="value" >{{value}}
</select>
</div>
</div>
First of all take a look at this post https://pt.meta.stackoverflow.com/questions/5483/manual-de-como-n%C3%83o-ask-questions/5485#5485 and this also https://answall.com/help/mcve. It will help you a lot in your questions
– user60252
I have an example with plugins, which looks like a select with checkboxes, see example http://kithomepage.com/sos/ComboBox-com-opcoes-de-CheckBox.html. With checkboxes + inputs not seen yet.
– user60252