adding js to close the member filters on page load for mobile
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 3 May 2019 19:58:17 +0000 (15:58 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 3 May 2019 19:58:17 +0000 (15:58 -0400)
js/app.js
js/custom/pageSetup.js

index c055cf5..db6e9c1 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -183,6 +183,13 @@ $(document).ready(function () {
         }
     });
     $(function(){$(".scroll").click(function(){$("html,body").animate({scrollTop:$("#glm-main-header").offset().top},"1000");return false})})
+    
+    if( $(window).width() < 641 ){
+        if( $(".glm-member-db-list.glm-member-db-map-view").hasClass("filters-opened") ){
+            $(".glm-member-db-list.glm-member-db-map-view").removeClass("filters-opened");
+            $(".glm-member-db-list.glm-member-db-map-view").addClass("filters-closed");
+        }
+    }
 });;jQuery(function($){
    
         if($(document).scrollTop() > 0){
index 9d8b56c..e10653e 100644 (file)
@@ -49,4 +49,11 @@ $(document).ready(function () {
         }
     });
     $(function(){$(".scroll").click(function(){$("html,body").animate({scrollTop:$("#glm-main-header").offset().top},"1000");return false})})
+    
+    if( $(window).width() < 641 ){
+        if( $(".glm-member-db-list.glm-member-db-map-view").hasClass("filters-opened") ){
+            $(".glm-member-db-list.glm-member-db-map-view").removeClass("filters-opened");
+            $(".glm-member-db-list.glm-member-db-map-view").addClass("filters-closed");
+        }
+    }
 });
\ No newline at end of file