deactivating the products sidebar from being clickable, adding share this icon, makin...
authorAnthony Talarico <talarico@gaslightmedia.com>
Wed, 7 Dec 2016 19:38:54 +0000 (14:38 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Wed, 7 Dec 2016 19:38:54 +0000 (14:38 -0500)
assets/share-icon.png [new file with mode: 0644]
js/app.js
js/custom/pageSetup.js
lib/menu-walker.php

diff --git a/assets/share-icon.png b/assets/share-icon.png
new file mode 100644 (file)
index 0000000..6df905d
Binary files /dev/null and b/assets/share-icon.png differ
index df7584a..0b1b05d 100644 (file)
--- a/js/app.js
+++ b/js/app.js
@@ -34,7 +34,19 @@ $(document).ready(function () {
     var page      = $('body'),
         phone     = page.find( $('.tel-phone') ),
         dropdown  = page.find( $('ul#menu-topbar')),
-        nav_links = page.find( $(dropdown).children('li').children('a') );
+        nav_links = page.find( $(dropdown).children('li').children('a') ),
+        products_sidebar = page.find($('#main-sidebar'));
+    products_sidebar.find('ul li').each(function(){
+       var link = $(this).children('a');
+       link.prop('href', '#');
+       link.on('click', function(e){
+            e.preventDefault();
+        });
+        link.css('cursor', 'default');
+    });
+
+    console.log(products_sidebar);
+
     
     nav_links.each(function(){
         $(this).on('click', function(e){
index bf767c4..cd28136 100644 (file)
@@ -25,7 +25,19 @@ $(document).ready(function () {
     var page      = $('body'),
         phone     = page.find( $('.tel-phone') ),
         dropdown  = page.find( $('ul#menu-topbar')),
-        nav_links = page.find( $(dropdown).children('li').children('a') );
+        nav_links = page.find( $(dropdown).children('li').children('a') ),
+        products_sidebar = page.find($('#main-sidebar'));
+    products_sidebar.find('ul li').each(function(){
+       var link = $(this).children('a');
+       link.prop('href', '#');
+       link.on('click', function(e){
+            e.preventDefault();
+        });
+        link.css('cursor', 'default');
+    });
+
+    console.log(products_sidebar);
+
     
     nav_links.each(function(){
         $(this).on('click', function(e){
index 5d5d54e..51e4a08 100644 (file)
@@ -65,6 +65,9 @@ class Glm_Theme_Off_Canvas_Walker extends Walker_Nav_Menu {
         if ( in_array( 'label', $classes ) ) {
             $item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '<label>$1</label>', $item_html );
         }
+        if ( $depth === 0  && $object->has_children ) {
+            $item_html = preg_replace( '/<a[^>]*>(.*)<\/a>/iU', '<span style="color:white;">$1</span>', $item_html );
+        }
 
         $output .= $item_html;
     }