From 23a986cc664f2fed62d566af367b45ad05d55429 Mon Sep 17 00:00:00 2001 From: Laury GvR Date: Tue, 28 Aug 2018 16:19:03 -0400 Subject: [PATCH] Remove unnecessary js and markup for unused manufacturer dropdown --- js/app.js | 34 +++++++++++++++++----------------- js/custom/pageSetup.js | 34 +++++++++++++++++----------------- parts/manufacturers.php | 15 +-------------- 3 files changed, 35 insertions(+), 48 deletions(-) diff --git a/js/app.js b/js/app.js index d51ac5d..f82bf8e 100644 --- a/js/app.js +++ b/js/app.js @@ -41,24 +41,24 @@ $(document).ready(function () { }); if( $(window).width() > 786){ - $('.manufacturer-brand').attr('data-options',"is_hover:true" ); + //$('.manufacturer-brand').attr('data-options',"is_hover:true" ); $(document).foundation('dropdown', 'reflow'); }else{ - $('.glm-rv-brand').each(function(){ - let url = $(this).children('a').attr('href'); - $(this).attr('data-url', url); - }) - $('.glm-rv-brand').on("click", function(){ - window.location = $(this).data('url'); - }) - $('.manufacturer-brand').each(function(){ - let url = $(this).children('a').attr('href'); - if( $(this).children('ul').length <= 0 || $(this).children('ul').css("touch-action") === "manipulation"){ - // $(this).attr('data-url', url); - $(this).on("click", function(){ - window.location = url; - }) - } - }) + // $('.glm-rv-brand').each(function(){ + // let url = $(this).children('a').attr('href'); + // $(this).attr('data-url', url); + // }) + // $('.glm-rv-brand').on("click", function(){ + // window.location = $(this).data('url'); + // }) + // $('.manufacturer-brand').each(function(){ + // let url = $(this).children('a').attr('href'); + // if( $(this).children('ul').length <= 0 || $(this).children('ul').css("touch-action") === "manipulation"){ + // // $(this).attr('data-url', url); + // $(this).on("click", function(){ + // window.location = url; + // }) + // } + // }) } }); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index eefc93f..9a20a60 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -32,24 +32,24 @@ $(document).ready(function () { }); if( $(window).width() > 786){ - $('.manufacturer-brand').attr('data-options',"is_hover:true" ); + //$('.manufacturer-brand').attr('data-options',"is_hover:true" ); $(document).foundation('dropdown', 'reflow'); }else{ - $('.glm-rv-brand').each(function(){ - let url = $(this).children('a').attr('href'); - $(this).attr('data-url', url); - }) - $('.glm-rv-brand').on("click", function(){ - window.location = $(this).data('url'); - }) - $('.manufacturer-brand').each(function(){ - let url = $(this).children('a').attr('href'); - if( $(this).children('ul').length <= 0 || $(this).children('ul').css("touch-action") === "manipulation"){ - // $(this).attr('data-url', url); - $(this).on("click", function(){ - window.location = url; - }) - } - }) + // $('.glm-rv-brand').each(function(){ + // let url = $(this).children('a').attr('href'); + // $(this).attr('data-url', url); + // }) + // $('.glm-rv-brand').on("click", function(){ + // window.location = $(this).data('url'); + // }) + // $('.manufacturer-brand').each(function(){ + // let url = $(this).children('a').attr('href'); + // if( $(this).children('ul').length <= 0 || $(this).children('ul').css("touch-action") === "manipulation"){ + // // $(this).attr('data-url', url); + // $(this).on("click", function(){ + // window.location = url; + // }) + // } + // }) } }); diff --git a/parts/manufacturers.php b/parts/manufacturers.php index ce9c55a..8757505 100644 --- a/parts/manufacturers.php +++ b/parts/manufacturers.php @@ -26,7 +26,7 @@ unset($manufacturers['RV Classes']); } } ?> -
  • +
  • url){ ?> @@ -34,19 +34,6 @@ unset($manufacturers['RV Classes']); ID); ?> url){ ?> - - - - -
  • -- 2.17.1