Well, sure it runs fine. I will call this code « autohide ».
Sorry Joel, I'm not sure what you mean?
Here's the thing about element.hide() : when you use hide(), the div can no longer be clicked on or see other mouse events. This is why if you Toggle Hide/Show on the element itself, you can hide it, but then can't show it again. There really should be a note in the comments warning users about this situation (I'll forward this on to the team).
So ideally, you should put the Toggle Hide/Show snippet on another element, and then target the element you want to hide/show. If you really want it to be on the element that you click on, you can fake it by adding the snippet to an element positioned over the one you want to hide/show, and set this element's Opacity property to 0%.
Thanks for your reply. Yes, I understand about the hide() issue and got it working.
I appreciate your help.