Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
06-12-2010, 08:14 PM #1
- Join Date
- Nov 2009
- Thanked 0 Times in 0 Posts
Safari Mobile: Clicking the Body Doesn't Work
I manage a private website that has a normal desktop version and also an iPhone version. Both versions use jQuery. I'm wondering if I could get some help with the iPhone version.
Right now, I have one of the navigation items set up so that when it's tapped on, a submenu with more navigation items appear. This is much like the "more" menu at the iPhone version of http://www.google.com/. The problem I'm having is that once that submenu is shown, the only way to make it disappear again is to tap on one of its items. I'd like to be able to tap anywhere outside of the submenu to make it disappear. This is how the iPhone version of http://www.google.com/ behaves, so I know it's possible.
The only way I can think of accomplishing this is to add a click event to the body that calls a function that removes the submenu. However, I can't get it to work. At the bottom of this post you will find code that illustrates this problem. I would really appreciate any help. Thanks!