initMap();
mapInitialized = true;
}
+ var currentScroll = $(window).scrollTop(); // get current position
+ var mapTop = $("#glm-locationMap-container").offset().top-10;
+ {if $settings.list_show_search}fixmeTop = $('#glm-member-list-filters-button').offset().top;{/if}
+ if (currentScroll >= mapTop) {
+ $('body,html').animate({
+ scrollTop: $("#glm-locationMap-container").offset().top-100
+ }, 50);
+ } else {
+ $('body,html').animate({
+ scrollTop: $("#glm-locationMap-container").offset().top-100
+ }, 400);
+ }
});
{if $settings.list_map_show_opened}
// Start with map opened