Working on the mobile menu
authorSteve Sutton <steve@gaslightmedia.com>
Wed, 19 Nov 2014 18:06:02 +0000 (13:06 -0500)
committerSteve Sutton <steve@gaslightmedia.com>
Wed, 19 Nov 2014 18:06:02 +0000 (13:06 -0500)
output with the arrows

assets/pf-arrow-mmenu.png [new file with mode: 0644]
css/styles.css
footer.php

diff --git a/assets/pf-arrow-mmenu.png b/assets/pf-arrow-mmenu.png
new file mode 100644 (file)
index 0000000..b60173b
Binary files /dev/null and b/assets/pf-arrow-mmenu.png differ
index c5d2fd1..b00e6d8 100644 (file)
@@ -572,4 +572,56 @@ img.alignleft, img.alignright, img.aligncenter, div.wp-caption img {
     margin-top: 50px;
     border: 4px solid white;
 }
-/* End Slideshow */
\ No newline at end of file
+/* End Slideshow */
+
+/* for the mobile menu */
+aside.left-off-canvas-menu {
+  background: transparent;
+  background-color: rgba(255, 255, 255, 0.8);
+}
+aside.left-off-canvas-menu li.page_item {
+  display: block;
+  overflow: hidden;
+  position: relative;
+}
+aside.left-off-canvas-menu .off-canvas-list ul li a {
+  font-family: "Arial";
+  font-size: 18px;
+  line-height: 20px;
+  color: black;
+  border-bottom: 1px solid #b1b3b6;
+  background-repeat: no-repeat;
+  background-position: 3px 50%;
+  padding-left: 55px;
+}
+aside.left-off-canvas-menu .off-canvas-list ul li a:hover {
+  background-color: transparent;
+  color: #f27225;
+}
+aside.left-off-canvas-menu li.page_item_has_children a.toggle {
+  background: url('../assets/pf-arrow-mmenu.png');
+  background-repeat: no-repeat;
+  background-position: 50% 3px;
+  width: 40px;
+  height: 100%;
+  position: absolute;
+  right: 0;
+  top: 0;
+  transition: none;
+}
+aside.left-off-canvas-menu li.page_item_has_children a.toggle.open {
+  background-position: 50% -40px;
+}
+aside.left-off-canvas-menu ul.children {
+  display: none;
+}
+aside.left-off-canvas-menu .off-canvas-list ul li > ul li > a {
+  padding-left: 10px;
+  margin-left: 25px;
+  font-size: 16px;
+  line-height: 18px;
+}
+aside.left-off-canvas-menu ul.open {
+  display: block;
+}
+/* End Mobile Menu */
\ No newline at end of file
index b3a060e..927f83e 100644 (file)
  </div><!--/off-canvas-->
     <script src="<?php bloginfo('template_url'); ?>/js/foundation.min.js"></script>
     <script>
-     $(document).foundation();
+    $(document).foundation();
+    $(document).ready(function(){
+        $('ul.children').each(function(){
+            $(this).before('<a class="toggle" href="#"></a>');
+        });
+        $('a.toggle').click('click', function(){
+            console.log('clicked me!');
+            $(this).toggleClass('open');
+            $(this).siblings('ul').toggleClass('open');
+        });
+//        $('.off-canvas-list').find('a.toggle').click(function(){
+//            console.log('clicked me!');
+//            $(this).toggleClass('open');
+//            $(this).siblings('ul').toggleClass('open');
+//        });
+    });
     </script>
     <?php wp_footer();?>
  </body>