Web(HTML5)
jquery mobile popup show programmatically
by swconsulting
2017. 9. 11.
<div id="noticeDiv">
<a id="notice" data-role="button"
onclick="showNoticePopup()"
class="ui-shadow ui-btn ui-corner-all ui-station-main-info">...</a>
<div id="popupNoticeInfo" data-role="popup"
data-position-to="window" data-transition="turn"
style="max-width:280px">
<a href="#" data-rel="back"
class="ui-btn ui-corner-all ui-shadow ui-btn-a ui-icon-delete ui-btn-icon-notext ui-btn-right">Close</a>
<p id="popupNotice"></p>
</div>
</div>
function showNoticePopup() {
var noticeInfo = android.getNotice();
console.log('[showNoticePopup]' + noticeInfo);
$("#popupNoticeInfo").popup("open", {positionTo: '#noticeDiv'});
$("#popupNotice").html(noticeInfo);
//setTimeout(function(){ $("#popupNoticeInfo").popup("close"); }, 5000);
}