From: Laury GvR Date: Mon, 12 Feb 2018 13:43:49 +0000 (-0500) Subject: Run FP OurImpact CountUp script only when scrolled X-Git-Tag: v1.0.0^2~7 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=e310ae5bf3ca20b17c3a2379ef27f9d93e5b125e;p=WP-Themes%2Fkhako.git Run FP OurImpact CountUp script only when scrolled - Rather than counting up the numbers in Our Impact as soon as the frontpage is loaded, this now only happens the first time the relevant section is scrolled into view. - Also added comments and removed test console logs. --- diff --git a/functions.php b/functions.php index 992134e..c8fcbff 100644 --- a/functions.php +++ b/functions.php @@ -9,7 +9,7 @@ $includePages = array(); $frontPageId = get_option('page_on_front'); add_action('widgets_init', 'glm_quicksite_widget_init'); -DEFINE("GLM_BLOCKS_FRONT_GROUP",270); +DEFINE("GLM_BLOCKS_FRONT_GROUP",270);//270 DEFINE("GLM_BLOCKS_OUR_IMPACT_GROUP",271);//271 if (!function_exists('glm_quicksite_widget_init')) { diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index 4d7e9fc..6a1ff18 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -32,16 +32,6 @@ $(document).ready(function () { var oc_menu = page.find( $('.left-off-canvas-list') ).children('ul'); var oc_menu_items = oc_menu.children('li'); - var our_impact = page.find('#our-impact-items'); - var our_impact_items = our_impact.children('.linked'); - - our_impact_items.each(function() { - this.addEventListener("click", function() { - - console.log("Clicked"); - window.location = $(this).attr("href"); - }) - }); }); diff --git a/parts/glm-blocks-our-impact.php b/parts/glm-blocks-our-impact.php index b2226ec..247e410 100644 --- a/parts/glm-blocks-our-impact.php +++ b/parts/glm-blocks-our-impact.php @@ -26,48 +26,6 @@

- - -

post_content;?>

url):?> @@ -87,4 +45,74 @@ - \ No newline at end of file + + + + \ No newline at end of file