Hi I would like to figure out how to do some logic on a checkbox dilemma.
I have a listing for a video with tags associated with it.
It has a corresponding checkbox.
When the checkbox is checked the listing (display: none) is shown using jquery.
Now, since each video has multiple tags. The opposite function will prove undesirable because if the box is NOT checked it would remove its associated videos INCLUDING videos who happen to have been shown by other chekced tag boxes. And so as soon a div is shown, it is immediately hidden again. You follow?
I am envisioning something like
if (tag1 AND tag2 AND tag3 AND tag4 are not checked) then (hide the video div)
any way I can make that a reality?
Here's the first half, the rest might be up to you!!
$("#squaredThree<? echo $a_number ?>").change(function() {
var amount = 0;
$("#squaredThree<? echo $a_number ?>:checked").each(function(){
console.log('this has been determined to be ":checked"');
var theonestoshow = document.getElementsByClassName('<? echo $total_tags[$a_number] ?>');
$(theonestoshow).show( "drop", 300);
});
});
additionally for your consideration is the styled interface so you can get an idea of what I am even talking about: