I need a drop-down with check-boxes but without using the select feature as I want to check multiple checkbox at once (I don't want the multiple on select).
I have tried adding classes to the checkbox and then check via jQuery or via vanilla Javascript if they're 'checked' but I never get an answer.
How I'm checking in jQuery -
if($('.apple').is(':checked')){
alert('I WAS CLICKED')
}
How I'm checking with JS -
let apple = document.getElementByClassName('apple')
if(apple.checked){
alert('I WAS CLICKED')
}
This is the fiddle: http://jsfiddle.net/8L4g5dov/3/