Skip to content

Commit

Permalink
2.0.6
Browse files Browse the repository at this point in the history
Added removeElements option in case there are other elements in the
meanmenu div that need to be shown/hidden. Updates for CSS.
  • Loading branch information
Chris Wharton committed Oct 14, 2013
1 parent dcef398 commit 68eedc2
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 17 deletions.
7 changes: 6 additions & 1 deletion README.md
@@ -1,4 +1,4 @@
MeanMenu v2.0.5 MeanMenu v2.0.6
=========== ===========


A menu system for converting a standard menu into a mobile/tablet responsive menu, media query independent. A menu system for converting a standard menu into a mobile/tablet responsive menu, media query independent.
Expand Down Expand Up @@ -96,4 +96,9 @@ meanRemoveAttrs: false
onePage: false onePage: false


- set to true for one page sites, the navigation will close back up on itself on click - set to true for one page sites, the navigation will close back up on itself on click

removeElements: ""

- enter comma separated values in here of elements you want hidden from the container of meanmenu e.g. if you had a search box called .search, enter ".search" in here



2 changes: 1 addition & 1 deletion demo.html
Expand Up @@ -90,7 +90,7 @@
<ul> <ul>
<li><a href="#">Fourth Level Link</a></li> <li><a href="#">Fourth Level Link</a></li>
<li><a href="#">Fourth Level Link</a></li> <li><a href="#">Fourth Level Link</a></li>
<li><a href="#">Fourth Level Link</a> <li><a href="#">Fourth Level Link with extra long name so it wraps</a>
<ul> <ul>
<li><a href="#">Fifth Level Link</a></li> <li><a href="#">Fifth Level Link</a></li>
<li><a href="#">Fifth Level Link</a></li> <li><a href="#">Fifth Level Link</a></li>
Expand Down
8 changes: 6 additions & 2 deletions jquery.meanmenu.js
@@ -1,5 +1,5 @@
/*! /*!
* jQuery meanMenu v2.0.5 * jQuery meanMenu v2.0.6
* @Copyright (C) 2012-2013 Chris Wharton (https://github.com/weare2ndfloor/meanMenu) * @Copyright (C) 2012-2013 Chris Wharton (https://github.com/weare2ndfloor/meanMenu)
* *
*/ */
Expand Down Expand Up @@ -44,7 +44,8 @@
meanExpand: "+", // single character you want to represent the expand for ULs meanExpand: "+", // single character you want to represent the expand for ULs
meanContract: "-", // single character you want to represent the contract for ULs meanContract: "-", // single character you want to represent the contract for ULs
meanRemoveAttrs: false, // true to remove classes and IDs, false to keep them meanRemoveAttrs: false, // true to remove classes and IDs, false to keep them
onePage: false // set to true for one page sites onePage: false, // set to true for one page sites
removeElements: "" // set to hide page elements
}; };
var options = $.extend(defaults, options); var options = $.extend(defaults, options);


Expand All @@ -71,6 +72,7 @@
var meanContract = options.meanContract; var meanContract = options.meanContract;
var meanRemoveAttrs = options.meanRemoveAttrs; var meanRemoveAttrs = options.meanRemoveAttrs;
var onePage = options.onePage; var onePage = options.onePage;
var removeElements = options.removeElements;


//detect known mobile/tablet usage //detect known mobile/tablet usage
if ( (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/Android/i)) || (navigator.userAgent.match(/Blackberry/i)) || (navigator.userAgent.match(/Windows Phone/i)) ) { if ( (navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)) || (navigator.userAgent.match(/iPad/i)) || (navigator.userAgent.match(/Android/i)) || (navigator.userAgent.match(/Blackberry/i)) || (navigator.userAgent.match(/Windows Phone/i)) ) {
Expand Down Expand Up @@ -130,6 +132,7 @@
jQuery(meanMenu).show(); jQuery(meanMenu).show();
menuOn = false; menuOn = false;
meanMenuExist = false; meanMenuExist = false;
jQuery(removeElements).show();
} }


//navigation reveal //navigation reveal
Expand Down Expand Up @@ -212,6 +215,7 @@
} }
$navreveal.toggleClass("meanclose"); $navreveal.toggleClass("meanclose");
meanInner(); meanInner();
jQuery(removeElements).hide();
}); });


// for one page websites, reset all variables... // for one page websites, reset all variables...
Expand Down
4 changes: 2 additions & 2 deletions jquery.meanmenu.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 13 additions & 9 deletions meanmenu.css
@@ -1,7 +1,7 @@


/*! ####################################################################### /*! #######################################################################
MeanMenu MeanMenu 2.0.6
-------- --------
To be used with jquery.meanmenu.js by Chris Wharton (http://www.meanthemes.com/plugins/meanmenu/) To be used with jquery.meanmenu.js by Chris Wharton (http://www.meanthemes.com/plugins/meanmenu/)
Expand Down Expand Up @@ -54,7 +54,7 @@ a.meanmenu-reveal {
float: left; float: left;
width: 100%; width: 100%;
background: #0c1923; background: #0c1923;
margin-top: 33px; margin-top: 44px;
} }


.mean-container .mean-nav ul { .mean-container .mean-nav ul {
Expand All @@ -78,17 +78,17 @@ a.meanmenu-reveal {
margin: 0; margin: 0;
text-align: left; text-align: left;
color: #fff; color: #fff;
border-bottom: 1px solid #383838; border-top: 1px solid #383838;
border-bottom: 1px solid rgba(255,255,255,0.5); border-top: 1px solid rgba(255,255,255,0.5);
text-decoration: none; text-decoration: none;
text-transform: uppercase; text-transform: uppercase;
} }


.mean-container .mean-nav ul li li a { .mean-container .mean-nav ul li li a {
width: 80%; width: 80%;
padding: 1em 10%; padding: 1em 10%;
border-bottom: 1px solid #f1f1f1; border-top: 1px solid #f1f1f1;
border-bottom: 1px solid rgba(255,255,255,0.25); border-top: 1px solid rgba(255,255,255,0.25);
opacity: 0.75; opacity: 0.75;
filter: alpha(opacity=75); filter: alpha(opacity=75);
text-shadow: none !important; text-shadow: none !important;
Expand Down Expand Up @@ -121,20 +121,24 @@ a.meanmenu-reveal {
} }


.mean-container .mean-nav ul li a.mean-expand { .mean-container .mean-nav ul li a.mean-expand {
margin-top: 1px;
width: 26px; width: 26px;
height: 26px; height: 32px;
border: none !important;
padding: 12px !important; padding: 12px !important;
text-align: center; text-align: center;
position: absolute; position: absolute;
right: 0; right: 0;
top: 0; top: 0;
z-index: 2; z-index: 2;
font-weight: 700; font-weight: 700;
background: rgba(255,255,255,0.1);
border: none !important;
border-left: 1px solid rgba(255,255,255,0.4) !important;
border-bottom: 1px solid rgba(255,255,255,0.2) !important;
} }


.mean-container .mean-nav ul li a.mean-expand:hover { .mean-container .mean-nav ul li a.mean-expand:hover {
background: none; background: rgba(0,0,0,0.9);
} }


.mean-container .mean-push { .mean-container .mean-push {
Expand Down
4 changes: 2 additions & 2 deletions meanmenu.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 68eedc2

Please sign in to comment.