From b57b7a922bdea0f5edef9b067e85c71d0c4d9952 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 18 Aug 2016 16:25:42 -0400 Subject: [PATCH] removing overlay from the front page blocks carousel for mobile view --- js/app.js | 34 ++++++++++++++++++---------------- js/custom/pageSetup.js | 34 ++++++++++++++++++---------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/js/app.js b/js/app.js index 81e6d2f..0456694 100644 --- 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(""); }); - - 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"); + } + }); + } }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 3e2c137..e26668f 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -261,21 +261,23 @@ $(document).ready(function () { var url = $(this).find(block_overlay).children("a").attr("href"); $(this).wrap(""); }); - - 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"); + } + }); + } }); -- 2.17.1