changing the tickets menu to drop right instead of left
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 22 Mar 2017 19:29:25 +0000 (15:29 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 22 Mar 2017 19:29:25 +0000 (15:29 -0400)
js/app.js
js/custom/pageSetup.js
lib/menu-walker.php

index 4bb0ecd..641b50b 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -44,15 +44,18 @@ $(document).ready(function () {
     var sub_menu_links      = sub_menu_items.children('a');
     var oc_menu             = page.find( $('.left-off-canvas-list') ).children('ul');
     var oc_menu_items       = oc_menu.children('li');
+    var tickets_menu        = page.find( $(".tickets-menu") );
     var schedules, tickets;
-
+    
+    console.log(tickets_menu);
     oc_menu_items.each(function(index, value) {
         var title = $(this).children('a').text(); 
         if( title === 'Buy Tickets' || title === 'Schedules'){
             $(this).remove();
         }
     });
-
+    
+    tickets_menu.removeClass('drop-left').addClass('drop-right');
     sub_menu_items.each(function(index, value){
         var link = $(this).children('a');
         link.addClass("submenu-link");
@@ -86,4 +89,6 @@ $(document).ready(function () {
     });
     schedules_widget.fadeIn(300);
     ticket_form.fadeIn(300);
+    
+    
 });
index f2f8fb5..83daf7c 100644 (file)
@@ -33,15 +33,18 @@ $(document).ready(function () {
     var sub_menu_links      = sub_menu_items.children('a');
     var oc_menu             = page.find( $('.left-off-canvas-list') ).children('ul');
     var oc_menu_items       = oc_menu.children('li');
+    var tickets_menu        = page.find( $(".tickets-menu") );
     var schedules, tickets;
-
+    
+    console.log(tickets_menu);
     oc_menu_items.each(function(index, value) {
         var title = $(this).children('a').text(); 
         if( title === 'Buy Tickets' || title === 'Schedules'){
             $(this).remove();
         }
     });
-
+    
+    tickets_menu.removeClass('drop-left').addClass('drop-right');
     sub_menu_items.each(function(index, value){
         var link = $(this).children('a');
         link.addClass("submenu-link");
@@ -75,4 +78,6 @@ $(document).ready(function () {
     });
     schedules_widget.fadeIn(300);
     ticket_form.fadeIn(300);
+    
+    
 });
index 266a2bd..6a438d3 100644 (file)
@@ -13,7 +13,7 @@ class Glm_Theme_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' : '';
-        if( $element->ID === 231 || $element->ID === 232 ){
+        if( $element->ID === 232 ){
             $element->classes[] = ( $element->post_parent == 0 && $mainLevelCounter < 1 ) ? '' : 'drop-right parent';
         } else {
             $element->classes[] = ( $element->post_parent == 0 && $mainLevelCounter < 1 ) ? '' : 'drop-left parent';