From: Laury GvR Date: Wed, 22 Aug 2018 22:05:58 +0000 (-0400) Subject: Place back removed map-button scroll code X-Git-Tag: v1.0.27^2~1 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=1f8ca269ca92d6caeec79fb6aa5d0d9260dc8cd2;p=WP-Themes%2Fvisitbenzie.git Place back removed map-button scroll code --- diff --git a/glm-member-db/views/front/members/list.html b/glm-member-db/views/front/members/list.html index db09089..58a1ee6 100644 --- a/glm-member-db/views/front/members/list.html +++ b/glm-member-db/views/front/members/list.html @@ -746,6 +746,18 @@ 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