From: Anthony Talarico Date: Mon, 29 Aug 2016 19:52:45 +0000 (-0400) Subject: adding margin to the community map dropdown content and title if there is no featured... X-Git-Tag: v1.0.0^2~65 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=6f664e3acb6f09c44a1d86f564139ca1f8c0f5b2;p=WP-Themes%2Fpetoskeyarea.git adding margin to the community map dropdown content and title if there is no featured image on its respective page --- diff --git a/parts/community-map.php b/parts/community-map.php index d83e50b..40c66a0 100644 --- a/parts/community-map.php +++ b/parts/community-map.php @@ -78,6 +78,7 @@ foreach ($nav_posts as $p){ var page_link = $(".map-page-link"); var page_title = $(".map-page-title"); var page_content = $(".map-page-content"); + var page_title_container = $(".map-page-title-container"); // set the default data next to the dropdown community map @@ -111,9 +112,11 @@ foreach ($nav_posts as $p){ // remove image container if there is no image if ( site_array[id]['image'] !== false ){ - image_container.css("display", "inline-block"); - regionData.find(image_container).css("height","175px").css("width", "300px").css("background", "url('" + site_array[id]['image'] + "')no-repeat center center").css("background-position", "cover"); + page_title_container.css("margin-top", "0px").css("margin-bottom", "0px"); + image_container.css("display", "inline-block"); + regionData.find(image_container).css("height","175px").css("width", "300px").css("background", "url('" + site_array[id]['image'] + "')no-repeat center center").css("background-position", "cover"); } else { + page_title_container.css("margin-top", "20px").css("margin-bottom", "20px"); image_container.css("display", "none"); }