We are selling products on our site that are optionally modifiable. I have several dependent fields that are shown only when a dependee field checkbox is 'checked'.
We also have a sidebar block that is updated whenever a dependee field is 'checked'. I'm doing this with some custom jQuery hide() and toggle() functions. In that sidebar block, we want an 'X' that allows the user to remove their modifications. When that 'X' is clicked, I'd like the dependee checkbox to be unchecked and also hide the dependent fields.
Here's what I have so far:
// When the 'X' button is clicked, uncheck the Modification checkbox
While the input (checkbox) does get unchecked, it does not hide the dependent fields as I expected. I've tried several different functions to uncheck the box ( trigger(), click(), attr('checked') ), but no success.