From e9eb00f65dfb18e4b6c26e72c130854bd0cd318d Mon Sep 17 00:00:00 2001 From: substantialnoninfringinguser Date: Mon, 18 May 2009 04:30:26 +0100 Subject: [PATCH] [svn] --- media/css/dropdownNavStyle.css | 32 ++++++++++++++++++++++++++++++++ media/css/ie.css | 1 + media/js/jquery.dropdownPlain.js | 17 +++++++++++++++++ templates/base.html | 2 +- 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 media/css/dropdownNavStyle.css create mode 100644 media/css/ie.css create mode 100644 media/js/jquery.dropdownPlain.js diff --git a/media/css/dropdownNavStyle.css b/media/css/dropdownNavStyle.css new file mode 100644 index 0000000..b3cf2b4 --- /dev/null +++ b/media/css/dropdownNavStyle.css @@ -0,0 +1,32 @@ +ul.dropdown { list-style: none; } +ul.dropdown a { text-decoration: none; } + +/* + LEVEL ONE +*/ +ul.dropdown li { font-weight: bold; float:left; zoom: 1; background: none; padding:0px; margin:0px;} +ul.dropdown a:hover { color: black; } +ul.dropdown a:active { color: black; } +ul.dropdown li a { display: block; padding: 4px 8px; border-right: 1px solid #333; + color: black; } +ul.dropdown li:last-child a { border-right: none; } /* Doesn't work in IE */ +ul.dropdown li.hover, +ul.dropdown li:hover { color: black; position: relative; } +ul.dropdown li.hover a { color: black; background:gray;} + + +/* + LEVEL TWO +*/ +ul.dropdown ul { width: 220px; visibility: hidden; position: absolute; bottom: 100%; left: 0px; margin-left:0px; padding-left: 0px; background:none} +ul.dropdown ul li { font-weight: normal; color: black; background: none; border-bottom: 1px solid #ccc; float: none; padding:0px; margin:0px} + + /* IE 6 & 7 Needs Inline Block */ +ul.dropdown ul li a { border-right: none; width: 100%; display: inline-block; color: black;} + +/* + LEVEL THREE +*/ +ul.dropdown ul ul { left: 100%; top: 0; } +ul.dropdown li:hover > ul { visibility: visible; } + diff --git a/media/css/ie.css b/media/css/ie.css new file mode 100644 index 0000000..c2878de --- /dev/null +++ b/media/css/ie.css @@ -0,0 +1 @@ +ul.dropdown ul li { display: inline; width: 100%; } diff --git a/media/js/jquery.dropdownPlain.js b/media/js/jquery.dropdownPlain.js new file mode 100644 index 0000000..6cdb803 --- /dev/null +++ b/media/js/jquery.dropdownPlain.js @@ -0,0 +1,17 @@ +$(function(){ + + $("ul.dropdown li").hover(function(){ + + $(this).addClass("hover"); + $('ul:first',this).css('visibility', 'visible'); + + }, function(){ + + $(this).removeClass("hover"); + $('ul:first',this).css('visibility', 'hidden'); + + }); + + $("ul.dropdown li ul li:has(ul)").find("a:first").append(" » "); + +}); \ No newline at end of file diff --git a/templates/base.html b/templates/base.html index ff37cd0..bb6d9b3 100644 --- a/templates/base.html +++ b/templates/base.html @@ -8,7 +8,7 @@ - +