What code would I need to close a toggle (after opening it) by clicking on anything outside of the toggle itself? I’ve kind of styled a single toggle to look like a drawer that opens to show a lot of content. I’d like to close it when you click off of that, not just when you re-click the toggle. Is there a way to change the target trigger for closing the toggle?
Hey calebcuster,
You need to add a jQuery function in the functions.php file.
http://activelab.io/code-snippets/use-jquery-to-hide-a-div-when-the-user-clicks-outside-of-it
To get class names for accordion tabs please check the docs
Best regards,
Vinay