I have implemented several apex:inputCheckboxes in my Visualforce pages. I used a JQuery function to handle the showing and hiding of these functions. I have outer checkboxes that once checked displays inner checkboxes for each outer one.
Everything works perfectly except for one thing. I added an "if" statement to check if all of the inner checkboxes have been unchecked, then uncheck the corresponding outer checkbox. This works in all aspects except one. I have a "Return" function on my pages that will allow the user to go to a previous search and it will save the users selections(which are the checkboxes). When the user comes back to the search page, the appropriate checkboxes are checked, however, deselecting the inner checkboxes does not deselect the outer one. I know this is happening because the outer one was never "clicked" when it returns (I set the selected value in the controller).
Sorry if this was long-winded. Here is my JQuery function:
Now when I return to the search page, and I manually deselect then re-select the outer checkbox, it works. It is just the initial return that doesn't do what I want.
I am not extremely knowledgeable with JQuery so any help would be greatly appreciated.