【发布时间】:2012-01-31 06:24:11
【问题描述】:
我正在使用以下代码为动态生成的锚标签打开thickbox,但它第一次不起作用,但第二次起作用。
function createMarker(point, InnerAddress) {
//Other Code
var strFBUserID = new GMarker(point, markerOptions);
GEvent.addListener(strFBUserID, "click", function() {
strFBUserID.openInfoWindowHtml(InnerAddress.split('$$')[0]);
tb_init('a.gmapthickbox');//works second time
});
allmarkers.push(strFBUserID);
return strFBUserID;
}
似乎 tb_init 之前触发过,openInfoWindowHtml,有什么办法可以解决这个问题?我试过 setTimeOut 但没有成功。任何帮助将不胜感激。
【问题讨论】:
标签: asp.net google-maps jquery thickbox