0

I am trying to implement an iOS popover-style menu for a mobile layout based on this proof of concept.

I have tried solutions given on previous answers on this forum, and have narrowed down the toggle function to the simplest 2-line code. This renders the menu items correctly on my page, check out the demo & live code:

http://jsfiddle.net/vgbn/eU2Zc/

However, I wasn't able to toggle the visibility with the JS code, and I was wondering whether it's the JS or the CSS that prevents the show/hide div?

Any help would be appreciated, thanks.

4

1 回答 1

1

只需更改您的函数以返回false;

$(function(){
$(".popmenu").click(function() {

    $(".popover").toggle();
  return false;
});
});

这是演示

于 2012-09-28T16:36:42.597 回答