X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/03ead3a59dc7c4d3df0d824c5994ddfc1630ec0c..3da2a95cea6b5efa760b378b45d9223d4b76657d:/app/views/site/_potlatch2.html.erb diff --git a/app/views/site/_potlatch2.html.erb b/app/views/site/_potlatch2.html.erb index 535992f2f..65ca9210e 100644 --- a/app/views/site/_potlatch2.html.erb +++ b/app/views/site/_potlatch2.html.erb @@ -71,13 +71,13 @@ doSWF(params.lat, params.lon, params.zoom || 17); <% end -%> - $(document).ready(function () { - $("body").on("click", "a.set_position", function () { - var data = $(this).data(); + $("body").on("click", "a.set_position", function (e) { + e.preventDefault(); - $("#potlatch").each(function () { - this.setPosition(data.lat, data.lon, Math.max(data.zoom || 15, 13)); - }); + var data = $(this).data(); + + $("#potlatch").each(function () { + this.setPosition(data.lat, data.lon, Math.max(data.zoom || 15, 13)); }); });