From 49e33673a03e3f6ec5dccfa131ae880c6885a4f5 Mon Sep 17 00:00:00 2001 From: Anthony Talarico Date: Thu, 11 Aug 2016 15:03:50 -0400 Subject: [PATCH] adding jquery to set default data for the dropdown display next to the community map --- parts/community-map.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/parts/community-map.php b/parts/community-map.php index 565511b..761287e 100644 --- a/parts/community-map.php +++ b/parts/community-map.php @@ -6,8 +6,8 @@
- - + + post_content),0, 300)); ?>
@@ -72,11 +72,18 @@ foreach ($nav_posts as $p){ var community_link = $("#interactive-map"); var default_content = ; - $(community_link).find(".dropdown").mouseleave( function () { + // set the default data next to the dropdown community map + function set_default_data(){ regionData.find(".map-page-title").html('post_title; ?>'); regionData.find(".map-image-container").css("height","200px").css("width", "250px").css("background", "url(' ')no-repeat center center").css("background-position", "cover"); regionData.find(".map-page-content").html(default_content); - + } + + $(community_link).find("li").mouseenter( function () { + set_default_data(); + }); + $(community_link).find(".dropdown").mouseleave( function () { + set_default_data(); }); // hover effects and data collection -- 2.17.1