Functions to update the map when clicking View Map on the admin member edit page...
authorLaury GvR <laury@gaslightmedia.com>
Tue, 2 May 2017 18:58:08 +0000 (14:58 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 2 May 2017 18:58:08 +0000 (14:58 -0400)
views/admin/member/memberInfo.html

index 9ce647f..9c8808d 100644 (file)
                 });
 
                 // When estimate location button is clicked, geocode using address
-                $('#glm-estimate-location').on('click', glmEstimateLocation());
-                $('#locationMapToggle').on('click', glmEstimateLocation());
 
-                function glmEstimateLocation() {
+                $(document).on('click','#locationMapToggle', glmEstimateLocation);
+                $(document).on('click','#glm-estimate-location', glmEstimateLocation);
 
+                function glmEstimateLocation() {
                     // Get all address parts
                     var geoAddr1 = $('#addr1').val().trim();
                     var geoAddr2 = $('#addr2').val().trim();