Permalink
Browse files

proto dropdown menus. needs work.

  • Loading branch information...
1 parent bd134fc commit e12966aa4b39068d0634da96becce8bea3b833a4 Dougal Campbell committed Apr 20, 2011
Showing with 50 additions and 3 deletions.
  1. +3 −0 functions.php
  2. +17 −0 js/jquery.dropdownPlain.js
  3. +0 −3 js/script.js
  4. +30 −0 style.css
View
@@ -137,6 +137,9 @@ function initializr_setup() {
// Add official.fm as an oembed provider:
wp_oembed_add_provider('http://official.fm/*', 'http://official.fm/services/oembed/');
+
+ // Dropdown menus
+ wp_enqueue_script('dropdown', trailingslashit( get_stylesheet_directory_uri() ) . 'js/jquery.dropdownPlain.js', array('jquery'), '1.0');
}
endif;
View
@@ -0,0 +1,17 @@
+$(function(){
+
+ $("#header-container nav ul li").hover(function(){
+
+ $(this).addClass("hover");
+ $('ul:first',this).css('visibility', 'visible');
+
+ }, function(){
+
+ $(this).removeClass("hover");
+ $('ul:first',this).css('visibility', 'hidden');
+
+ });
+
+ $("#header-container nav ul li ul li:has(ul)").find("a:first").append(" » ");
+
+});
View
@@ -1,3 +0,0 @@
-jQuery(function(){
- jQuery("#jquery-test").html("jQuery is loaded");
-});
View
@@ -218,6 +218,8 @@ h3{
font-size: 1.3em;
}
+/* Main nav */
+
#header-container nav{
float:right;
margin-top:95px;
@@ -238,6 +240,34 @@ h3{
background-color:#e44d26;
}
+/*
+ LEVEL ONE
+*/
+#header-container nav ul { position: relative; }
+/* #header-container nav ul li { font-weight: bold; float: left; zoom: 1; background: #ccc; } */
+/* #header-container nav ul li:last-child a { border-right: none; } /* Doesn't work in IE */
+/*#header-container nav ul li.hover,
+#header-container nav ul li:hover { background: #F3D673; color: black; position: relative; }
+#header-container nav ul li.hover a { color: black; }
+*/
+
+/*
+ LEVEL TWO
+*/
+#header-container nav ul ul { width: 220px; visibility: hidden; position: absolute; top: 100%; left: 0; }
+#header-container nav ul ul li { font-weight: normal; background: #f6f6f6; color: #000;
+ border-bottom: 1px solid #ccc; float: none; }
+
+ /* IE 6 & 7 Needs Inline Block */
+#header-container nav ul ul li a { border-right: none; width: 100%; display: inline-block; }
+
+/*
+ LEVEL THREE
+*/
+#header-container nav ul ul ul { left: 100%; top: 0; }
+#header-container nav ul li:hover > ul { visibility: visible; }
+
+
.skip-link { display: none; }
/* */

0 comments on commit e12966a

Please sign in to comment.