removing overlay from the front page blocks carousel for mobile view
authorAnthony Talarico <talarico@gaslightmedia.com>
Thu, 18 Aug 2016 20:25:42 +0000 (16:25 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Thu, 18 Aug 2016 20:25:42 +0000 (16:25 -0400)
js/app.js
js/custom/pageSetup.js

index 81e6d2f..0456694 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -270,21 +270,23 @@ $(document).ready(function () {
         var url = $(this).find(block_overlay).children("a").attr("href");
        $(this).wrap("<a class='block-link' href='" + url + "'></a>");
     });
-    
-   block_frame.hover( function(){
-        $(this).addClass("current-frame");
-       if( $(this).hasClass("darken")){
-           $(this).removeClass("darken");
-       }
-       $(block_frame).not($(this)).addClass("darken");
-   },function(){
-       $(this).removeClass("current-frame");
-   });
+   
+   if( $(window).width() > 640){    
+       block_frame.hover( function(){
+            $(this).addClass("current-frame");
+           if( $(this).hasClass("darken")){
+               $(this).removeClass("darken");
+           }
+           $(block_frame).not($(this)).addClass("darken");
+       },function(){
+           $(this).removeClass("current-frame");
+       });
 
-   glm_blocks_container.mouseleave( function () {
-       if ( block_frame.hasClass("darken") ){
-           block_frame.removeClass("darken");
-       }
-   });
-    
+
+       glm_blocks_container.mouseleave( function () {
+           if ( block_frame.hasClass("darken") ){
+               block_frame.removeClass("darken");
+           }
+       });
+   }
 });
index 3e2c137..e26668f 100644 (file)
@@ -261,21 +261,23 @@ $(document).ready(function () {
         var url = $(this).find(block_overlay).children("a").attr("href");
        $(this).wrap("<a class='block-link' href='" + url + "'></a>");
     });
-    
-   block_frame.hover( function(){
-        $(this).addClass("current-frame");
-       if( $(this).hasClass("darken")){
-           $(this).removeClass("darken");
-       }
-       $(block_frame).not($(this)).addClass("darken");
-   },function(){
-       $(this).removeClass("current-frame");
-   });
+   
+   if( $(window).width() > 640){    
+       block_frame.hover( function(){
+            $(this).addClass("current-frame");
+           if( $(this).hasClass("darken")){
+               $(this).removeClass("darken");
+           }
+           $(block_frame).not($(this)).addClass("darken");
+       },function(){
+           $(this).removeClass("current-frame");
+       });
 
-   glm_blocks_container.mouseleave( function () {
-       if ( block_frame.hasClass("darken") ){
-           block_frame.removeClass("darken");
-       }
-   });
-    
+
+       glm_blocks_container.mouseleave( function () {
+           if ( block_frame.hasClass("darken") ){
+               block_frame.removeClass("darken");
+           }
+       });
+   }
 });