jQuery Thickbox和谷歌地图Extinfowindow

[英]jQuery Thickbox and Google Maps Extinfowindow


I am trying to place a link into an Extinfowindow that obtains its content through an Ajax call. So, I click on a push pin marker, up pops the Extinfowindow with my ThickBox link in it, and when I inspect the DOM for the entire page at that point, I can see the element correctly showing up with the "thickbox" class. The link looks like this

我正在尝试将链接放入一个通过Ajax调用获取其内容的Extinfowindow。所以,我点击一个推针标记,向上弹出Extinfowindow,其中包含我的ThickBox链接,当我在那个点检查整个页面的DOM时,我可以看到元素正确显示“thickbox”类。链接看起来像这样

<A class="thickbox" title="" href="http://localhost:1293/Popup.aspx?
height=200&width=300&modal=true">Modal Popup</A>         

However, when I click on it, it does a full refresh and the target page loads in the browser, not in a popup. It seems that when the <A> for the Thickbox control is injected into the DOM after the initial load, jQuery is no longer able to do its magic and intercept the anchor link request. Does anybody have thoughts about how to do this better?

但是,当我单击它时,它会进行完全刷新,目标页面会在浏览器中加载,而不是在弹出窗口中加载。似乎当初始加载后将Thickbox控件的注入到DOM中时,jQuery不再能够发挥其魔力并拦截锚链接请求。有没有人想过如何更好地做到这一点?

1 个解决方案

#1


I had the same problem, except with Shadowbox. What I ended up doing was creating a function to manually open the shadowbox when the anchor is clicked.

我有同样的问题,除了Shadowbox。我最终做的是创建一个函数,在单击锚点时手动打开shadowbox。

It looks like there may be some similar fixes for ThickBox here and here, though they're a bit old. You may be able to work off of these to develop a good solution.

看起来这里和这里可能有一些类似的ThickBox修复,虽然它们有点旧。您可以利用这些来开发一个好的解决方案。

智能推荐

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.itdaan.com/blog/2009/06/02/54dc50a4db6da9e1f32c4c1d632afde9.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告