2013-03-19 64 views

回答

7

所以我猜這是你在說什麼。

http://api.jquerymobile.com/popup/

有這種內嵌在HTML某處。

<div data-role="popup" id="popupCloseLeft" class="ui-content" style="max-width:280px"> 
<a href="#" data-rel="back" data-role="button" data-theme="a" data-icon="delete" data-iconpos="notext" class="ui-btn-left">Close</a> 
<p>I have a close button at the top left corner with simple HTML markup.</p> 
</div> 

然後在你的失敗函數中調用這個。

$("#popupCloseLeft").popup("open"); 
+0

這給出了「未捕獲的錯誤:不能在初始化之前調用彈出方法;試圖調用方法'打開'」。 – 2014-12-23 23:17:23

+0

@PatrickBassut有趣。你有這樣的例子嗎? – Thunda 2014-12-24 03:40:37