From: Anthony Talarico Date: Thu, 18 Aug 2016 20:25:42 +0000 (-0400) Subject: removing overlay from the front page blocks carousel for mobile view X-Git-Tag: v1.0.0^2~112 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=b57b7a922bdea0f5edef9b067e85c71d0c4d9952;p=WP-Themes%2Fpetoskeyarea.git removing overlay from the front page blocks carousel for mobile view --- 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"); + } + }); + } });