我试图在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