修改下面的js,变成绝对定位的布局,增加ajax的分页。地址qiches.com,看到联系qq. this.setMarkerInSide = function(e) { if ($gf("#" + this.nameSidelists).length > 0) { this.createSidebarEntry(e, "gf_sidelists") } if ($gf("#" + this.nameSidebar).length > 0) { this.createSidebarEntry(e, "gf_sidebar") } }; this.createSidebarEntry = function(e, t) { var n = "gf_list_" + e.type + "_id_" + e.liste; var r = "gf_list_" + e.type + "_id_" + e.liste + "_idMarker_" + e.id; var i = document.createElement("div"); var s = e.name; if (e.distance > 0) { s = s + " (" + e.distance + this.radUnit + " )" } var xxx = this; i.innerHTML = s; i.title = s; i.id = r; if (this.clickMarker != 3) { i.style.cursor = "pointer" } i.style.marginTop = "5px"; i.style.marginLeft = "5px"; i.style.width = "220px"; i.style.cssFloat = "left"; i.onclick = function() { google.maps.event.trigger(e.ggMarker, "click"); google.maps.event.trigger(e.ggMarker, "rightclick") }; i.setAttribute("onMouseOver", 'this.style.fontWeight = "bold"'); i.setAttribute("onMouseOut", 'this.style.fontWeight = "normal"'); if (!document.getElementById(n)) { var o = this.getListName(e); var u = document.createElement("div"); s = "<strong>" + o + "</strong><br /> "; u.id = n; u.innerHTML = s; if (t == "gf_sidelists") { u.setAttribute("style", "padding:2px;float:left; width:100%; word-wrap:break-word;") } else if (t == "gf_sidebar") { u.setAttribute("style", "padding:2px;float:left; width:100%;word-wrap:break-word;border:1px solid grey;") } u.appendChild(i); document.getElementById(t).appendChild(u) var more = document.createElement("div"); more.style.marginTop = "5px"; more.style.marginLeft = "auto"; more.style.marginRight = "auto"; more.style.width = "200px"; more.style.textAlign = "center"; //more.innerHTML = "<a href='javascript:alert(d)'>下一页</a>"; document.getElementById("gf_sidelists").appendChild(more); } else { document.getElementById(n).appendChild(i) } if (this.useSideTemplate) { axGetSideItem(e.id, e.liste, e.distance, this.rootJoomla, r) } }; function axGetSideItem(e, t, n, r, i) { var s; try { if (typeof ActiveXObject != "undefined") { s = new ActiveXObject("Microsoft.XMLHTTP") } else if (window["XMLHttpRequest"]) { s = new XMLHttpRequest } } catch(o) {} var u = r + "?option=com_geocode_factory&task=axloadbubble&type=sidebar&idU=" + e + "&idL=" + t + "&distance=" + n; s.open("GET", u, true); if (document.getElementById("gf_debugmode_side_item")) { document.getElementById("gf_debugmode_side_item").innerHTML = "Sidelist link"; document.getElementById("gf_debugmode_bubble").href = u } s.onreadystatechange = function() { if (s.readyState == 4) { var e = s.responseText; if (e.length > 0) { $gf("#" + i).fadeOut("slow"); $gf("#" + i).html(s.responseText); $gf("#" + i).fadeIn("slow") } } }; s.send(null) }
2019-09-21 09:09:20