我試圖在jQuery Mobile中創建對話框,當您單擊Google Maps標記時出現對話框。以編程方式在jQuery Mobile中加載對話框?
示例網址:http://cyclestreets.darkgreener.com/location/(滾動到倫敦,英國的位置查看標記)。
我有一部分的方式出現,與此代碼:
google.maps.event.addListener(map_marker, 'click', function() {
$.mobile.changePage({ url: $("#photo"), data: "id=" + marker.id, type: "GET"}, 'pop', false, true);
});
但是,一些問題與造型和數據做:
- 出現的對話框是全屏幕。有什麼辦法可以使它成爲部分屏幕,like the default jQuery Mobile dialogs,並且像About和Prefs對話框on my home page?
- 標題中沒有關閉鏈接 - 這也是there is in the default jQuery mobile dialog。我能確保這一點出現,而不是手動添加它嗎?
- 在對話框的
.live()
事件中,我如何獲取傳遞給它的數據?
我加入'$( 「#照片」)固定的前兩項對話框({的AutoOpen:假});'文檔加載,第三個這個問題後:HTTP://計算器.com/questions/7272174/jquery-flow-of-events - 我看不到一個答案鏈接,將其添加爲答案。 – Richard