Tuesday 30 August 2016

javascript - Show/hide div when checkbox is selected

I would like to show/hide a div when a single checkbox is selected. It currently works with "Select all" but I can't get it to work with a single checkbox. Here's the code for "Select All":




JS:







HTML:



Select all



I'd like to display the div "mail_delete_button" when a single checkbox is selected and hide it when there's nothing checked. Note: My html/input field is in the form "messageform" This is my input code:







Any help would be greatly appreciated! Thanks! :)

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...