我在我的应用程序中创建了一个弹出菜单。问题是当我点击按钮第一次显示弹出菜单时,当我点击外面弹出菜单菜单时应隐藏但不隐藏。当我点击另一个按钮时,如果再次单击菜单按钮,弹出菜单会隐藏但不会再次打开。 这是为弹出菜单编写的代码:
<body>
<div data-role="page" id="demo_page" data-theme="d">
<div data-role="header" data-theme="b" data-position="fixed">
<h1>FOOOTER DEMO</h1>
</div>
<div data-role="content">
<h1>Footerdemo</h1>
<div data-role="popup" id="popupMenu" data-theme="d">
<ul data-role="listview" data-inset="true" data-theme="d"
data-divider-theme="d">
<li><a href="#">Adduser</a></li>
<li><a href="#">AddCompany</a></li>
</ul>
</div>
</div>
<div data-role="footer" data-theme="b" data-position="fixed">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr align="center" height="50">
<td><a href="#popupMenu" class="btn_add" data-rel="popup"
data-role="button" data-inline="true" data-icon="addbtn"
data-transition="slideup"></a></td>
<td><a href="footerdesign.html" class="btn_edit"
data-role="button" data-icon="editbtn" data-inline="true"></a></td>
<td><a href="#" class="btn_delete" data-role="button"
data-icon="deletebtn" data-inline="true" onclick="deleteUser()"></a>
</td>
<td><a href="footerdesign.html" class="btn_menu"
data-role="button" data-icon="menubtn" data-inline="true"></a></td>
</tr>
</table>
</div>
</div>
提前感谢。