Fix P2 interaction with search links
Need to prevent the default action so that the page isn't reloaded. Also, since the click event binding uses delegation, it isn't necessary to wrap it in $(document).ready().
This commit is contained in:
parent
47a75be1c7
commit
66ce4c3b93
1 changed files with 6 additions and 6 deletions
|
@ -71,13 +71,13 @@
|
||||||
doSWF(params.lat, params.lon, params.zoom || 17);
|
doSWF(params.lat, params.lon, params.zoom || 17);
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
$(document).ready(function () {
|
$("body").on("click", "a.set_position", function (e) {
|
||||||
$("body").on("click", "a.set_position", function () {
|
e.preventDefault();
|
||||||
var data = $(this).data();
|
|
||||||
|
|
||||||
$("#potlatch").each(function () {
|
var data = $(this).data();
|
||||||
this.setPosition(data.lat, data.lon, Math.max(data.zoom || 15, 13));
|
|
||||||
});
|
$("#potlatch").each(function () {
|
||||||
|
this.setPosition(data.lat, data.lon, Math.max(data.zoom || 15, 13));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue