From: Anthony Talarico Date: Thu, 11 Aug 2016 19:03:50 +0000 (-0400) Subject: adding jquery to set default data for the dropdown display next to the community map X-Git-Tag: v1.0.0^2~142 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=49e33673a03e3f6ec5dccfa131ae880c6885a4f5;p=WP-Themes%2Fpetoskeyarea.git adding jquery to set default data for the dropdown display next to the community map --- 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