From: Anthony Talarico Date: Fri, 11 Dec 2015 16:03:49 +0000 (-0500) Subject: added main nav to li in top bar X-Git-Tag: v1.0.0^2~28 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=d79bfd9fef9aabb816c3467ab5f98c32966f3ad5;p=WP-Themes%2Fstaffords.git added main nav to li in top bar --- diff --git a/js/app.js b/js/app.js index aeec555..423e48d 100644 --- a/js/app.js +++ b/js/app.js @@ -199,10 +199,10 @@ $(document).ready(function () { $("#properties .top-bar .top-bar-section ul#menu-properties li ul.dropdown li a").mouseout(function () { $("#properties .top-bar .top-bar-section ul#menu-properties #menu-item-1517 > a").css("box-shadow", "0px -7px 10px -9px rgba(0, 0, 0, 0.5) inset"); }); -// $("#long-bar section.top-bar-section ul > li > a").on("click", function (e) { -// e.preventDefault(); -// return false; -// }); + $("#long-bar").find("section.top-bar-section ul > li.main-nav > a").on("click", function (e) { + e.preventDefault(); + return false; + }); // $("a:contains('Dine')").attr("href", "#"); // $("a:contains('Explore')").attr("href", "#"); // $("a:contains('Play')").attr("href", "#"); diff --git a/js/custom/pageSetup.js b/js/custom/pageSetup.js index a209879..5061d12 100644 --- a/js/custom/pageSetup.js +++ b/js/custom/pageSetup.js @@ -190,10 +190,10 @@ $(document).ready(function () { $("#properties .top-bar .top-bar-section ul#menu-properties li ul.dropdown li a").mouseout(function () { $("#properties .top-bar .top-bar-section ul#menu-properties #menu-item-1517 > a").css("box-shadow", "0px -7px 10px -9px rgba(0, 0, 0, 0.5) inset"); }); -// $("#long-bar section.top-bar-section ul > li > a").on("click", function (e) { -// e.preventDefault(); -// return false; -// }); + $("#long-bar").find("section.top-bar-section ul > li.main-nav > a").on("click", function (e) { + e.preventDefault(); + return false; + }); // $("a:contains('Dine')").attr("href", "#"); // $("a:contains('Explore')").attr("href", "#"); // $("a:contains('Play')").attr("href", "#"); diff --git a/lib/menu-walker.php b/lib/menu-walker.php index 1ca6c0b..75edab9 100644 --- a/lib/menu-walker.php +++ b/lib/menu-walker.php @@ -9,7 +9,7 @@ class Feature_Top_Bar_Walker extends Walker_Nav_Menu { } $element->has_children = ! empty( $children_elements[ $element->ID ] ); $element->classes[] = ( $element->current || $element->current_item_ancestor ) ? 'active' : ''; - $element->classes[] = ( $element->has_children && 1 !== $max_depth ) ? 'has-dropdown' : ''; + $element->classes[] = ( $element->has_children && 1 !== $max_depth ) ? 'has-dropdown main-nav' : ''; // $element->classes[] = ( $element->post_parent == 0 && $mainLevelCounter < 3 ) ? '' : 'drop-left'; parent::display_element( $element, $children_elements, $max_depth, $depth, $args, $output ); } @@ -17,7 +17,7 @@ class Feature_Top_Bar_Walker extends Walker_Nav_Menu { // function start_el( &$output, $object, $depth = 0, $args = array(), $current_object_id = 0 ) { // $item_html = ''; // parent::start_el( $item_html, $object, $depth, $args ); -// +// // // Insert style to display page's thumbnail // $item_style = ''; // if ($depth == 0 && has_post_thumbnail((int)$object->object_id)) {