问题
According to the documentation for jQuery Mobile 1.2 it should be possible to make arbitrary divs popup without them being pages:
<div data-role="popup" id="popupHelp">I should be hidden</div>
Until <a href="#popupHelp" data-rel="popup" data-position-to="window">this</a> is clicked!
This seems to work fine in Chrome on the PC: The div is hidden until this is clicked and the popup is displayed.
On the iPhone however the div is displayed (with X close button) below the page footer before the link is clicked.
Is this a bug or some legacy code not supported in JQM 1.3.1?
PS: I'm aware this question has been asked but no appropriate answer was given.
回答1:
In my experience, the jQM popup is still pretty finicky. Make sure your popup div is defined within your page's content div (<div data-role="content">).
来源:https://stackoverflow.com/questions/16404211/popup-not-hidden-on-iphone-in-jquery-mobile-1-3-1