diff --git a/layouts/shortcodes/leaflet-map.html b/layouts/shortcodes/leaflet-map.html
index e0dfddf..acae842 100644
--- a/layouts/shortcodes/leaflet-map.html
+++ b/layouts/shortcodes/leaflet-map.html
@@ -143,7 +143,7 @@ Elevation profile options:
// Move the Leaflet attribution out of the map container
$('#map_attribution_{{ $uniqueId }}').append(
- $('.leaflet-control-attribution')
+ $('#map_container_{{ $uniqueId }} .leaflet-control-attribution')
);
// Restore the map when clicking outside the maximized map