Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow scrolling long sub menus via touch for fixed positioned menu bars
remove IE6/7/8 Js and CSS tweaks/hacks switch to box-sizing:border-box; add Bower support http://bower.io/ fix: Bootstrap addon drop-downs z-index issue fix: unneeded horizontal scrollbar triggered on RTL pages
- Loading branch information
Showing
28 changed files
with
3,188 additions
and
272 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
dist/ | ||
zip/ | ||
node_modules/ | ||
.DS_Store | ||
npm-debug.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
# SmartMenus | ||
|
||
jQuery website menu plugin. Responsive and accessible list-based website menus that work on all devices. | ||
Advanced jQuery website menu plugin. Responsive and accessible list-based website menus that work on all devices. | ||
Check out [the demo page](http://vadikom.github.io/smartmenus/src/demo/). | ||
|
||
## Homepage | ||
## Quick start | ||
|
||
http://www.smartmenus.org/ | ||
- [Download the latest release](http://www.smartmenus.org/download/). | ||
- Install with [Bower](http://bower.io): `bower install smartmenus`. | ||
- Clone the repo: `git clone https://github.com/vadikom/smartmenus.git`. | ||
|
||
## Download | ||
Check out the [project documentation](http://www.smartmenus.org/docs/) for quick setup instructions, API reference, tutorials and more. | ||
|
||
Download the ZIP package which includes a basic demo: | ||
## Homepage | ||
|
||
http://www.smartmenus.org/download/ | ||
<http://www.smartmenus.org/> | ||
|
||
## Getting started and API documentation | ||
## Community and support | ||
|
||
http://www.smartmenus.org/docs/ | ||
- Visit the [Community forums](http://www.smartmenus.org/support/forums/) for free support. | ||
- Read and subscribe to [the project blog](http://www.smartmenus.org/blog/). | ||
- Follow [@vadikom on Twitter](http://twitter.com/vadikom). | ||
|
||
## Bugs and issues | ||
|
||
https://github.com/vadikom/smartmenus/issues | ||
|
||
## Support forums | ||
For bugs and issues only please. For support requests please use the [Community forums](http://www.smartmenus.org/support/forums/). | ||
|
||
http://www.smartmenus.org/support/forums/ | ||
<https://github.com/vadikom/smartmenus/issues> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
"name": "smartmenus", | ||
"version": "0.9.7", | ||
"description": "Advanced jQuery website menu plugin. Responsive and accessible list-based website menus that work on all devices.", | ||
"homepage": "http://www.smartmenus.org/", | ||
"main": [ | ||
"dist/jquery.smartmenus.js" | ||
], | ||
"authors": [ | ||
"Vasil Dinkov <vasko.dinkov@gmail.com> (http://vadikom.com)" | ||
], | ||
"keywords": [ | ||
"menu", | ||
"navigation", | ||
"accessible", | ||
"responsive", | ||
"ui" | ||
], | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/vadikom/smartmenus.git" | ||
}, | ||
"license": "MIT", | ||
"ignore": [ | ||
".gitignore", | ||
"Gruntfile.js" | ||
], | ||
"dependencies": { | ||
"jquery": ">=1.4.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/* | ||
You probably do not need to edit this at all. | ||
Add some SmartMenus required styles not covered in Bootstrap 3's default CSS. | ||
These are theme independent and should work with any Bootstrap 3 theme mod. | ||
*/ | ||
/* sub menus arrows */ | ||
.navbar-nav .sub-arrow, .navbar-nav .collapsible .sub-arrow { | ||
position:static; | ||
margin-top:0; | ||
margin-right:0; | ||
margin-left:6px; | ||
display:inline-block; | ||
width:0; | ||
height:0; | ||
overflow:hidden; | ||
vertical-align:middle; | ||
border-top:4px solid; | ||
border-right:4px dashed transparent; | ||
border-bottom:4px dashed transparent; | ||
border-left:4px dashed transparent; | ||
} | ||
.navbar-fixed-bottom .sub-arrow { | ||
margin-top:-5px; | ||
border-top:4px dashed transparent; | ||
border-bottom:4px solid; | ||
} | ||
.navbar-nav ul .sub-arrow { | ||
position:absolute; | ||
right:0; | ||
margin-top:6px; | ||
margin-right:15px; | ||
border-top:4px dashed transparent; | ||
border-bottom:4px dashed transparent; | ||
border-left:4px solid; | ||
} | ||
.navbar-nav ul a.has-submenu { | ||
padding-right:30px; | ||
} | ||
/* scrolling arrows for tall menus */ | ||
.navbar-nav span.scroll-up, .navbar-nav span.scroll-down { | ||
position:absolute; | ||
display:none; | ||
visibility:hidden; | ||
height:20px; | ||
overflow:hidden; | ||
text-align:center; | ||
} | ||
.navbar-nav span.scroll-up-arrow, .navbar-nav span.scroll-down-arrow { | ||
position:absolute; | ||
top:-2px; | ||
left:50%; | ||
margin-left:-8px; | ||
width:0; | ||
height:0; | ||
overflow:hidden; | ||
border-top:7px dashed transparent; | ||
border-right:7px dashed transparent; | ||
border-bottom:7px solid; | ||
border-left:7px dashed transparent; | ||
} | ||
.navbar-nav span.scroll-down-arrow { | ||
top:6px; | ||
border-top:7px solid; | ||
border-right:7px dashed transparent; | ||
border-bottom:7px dashed transparent; | ||
border-left:7px dashed transparent; | ||
} | ||
/* add more indentation for 2+ level sub in collapsible mode - Bootstrap normally supports just 1 level sub menus */ | ||
.navbar-nav .collapsible ul .dropdown-menu > li > a, | ||
.navbar-nav .collapsible ul .dropdown-menu .dropdown-header { | ||
padding-left:35px; | ||
} | ||
.navbar-nav .collapsible ul ul .dropdown-menu > li > a, | ||
.navbar-nav .collapsible ul ul .dropdown-menu .dropdown-header { | ||
padding-left:45px; | ||
} | ||
.navbar-nav .collapsible ul ul ul .dropdown-menu > li > a, | ||
.navbar-nav .collapsible ul ul ul .dropdown-menu .dropdown-header { | ||
padding-left:55px; | ||
} | ||
.navbar-nav .collapsible ul ul ul ul .dropdown-menu > li > a, | ||
.navbar-nav .collapsible ul ul ul ul .dropdown-menu .dropdown-header { | ||
padding-left:65px; | ||
} | ||
/* fix SmartMenus sub menus auto width (subMenusMinWidth and subMenusMaxWidth options) */ | ||
.navbar-nav .dropdown-menu > li > a { | ||
white-space:normal; | ||
} | ||
.navbar-nav ul.sm-nowrap > li > a { | ||
white-space:nowrap; | ||
} | ||
/* fix .navbar-right subs alignment */ | ||
.navbar-right ul.dropdown-menu { | ||
left:0; | ||
right:auto; | ||
} | ||
/* The following will make the sub menus collapsible for small screen devices (it's not recommended editing these) */ | ||
.navbar-nav .collapsible ul {display:none;position:static !important;top:auto !important;left:auto !important;margin-left:0 !important;margin-top:0 !important;width:auto !important;min-width:0 !important;max-width:none !important;} | ||
.navbar-nav .collapsible ul.sm-nowrap > li > a {white-space:normal;} | ||
.navbar-nav .collapsible iframe{display:none;} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/*! | ||
* SmartMenus jQuery Plugin Bootstrap Addon - v0.1.1 - August 25, 2014 | ||
* http://www.smartmenus.org/ | ||
* | ||
* Copyright 2014 Vasil Dinkov, Vadikom Web Ltd. | ||
* http://vadikom.com | ||
* | ||
* Licensed MIT | ||
*/ | ||
|
||
(function($) { | ||
|
||
// init ondomready | ||
$(function() { | ||
|
||
// init all menus | ||
$('ul.navbar-nav').each(function() { | ||
var $this = $(this); | ||
$this.addClass('sm').smartmenus({ | ||
|
||
// these are some good default options that should work for all | ||
// you can, of course, tweak these as you like | ||
subMenusSubOffsetX: 2, | ||
subMenusSubOffsetY: -6, | ||
subIndicatorsPos: 'append', | ||
subIndicatorsText: '...', | ||
collapsibleShowFunction: null, | ||
collapsibleHideFunction: null, | ||
rightToLeftSubMenus: $this.hasClass('navbar-right'), | ||
bottomToTopSubMenus: $this.closest('.navbar').hasClass('navbar-fixed-bottom') | ||
}) | ||
// set Bootstrap's "active" class to SmartMenus "current" items (should someone decide to enable markCurrentItem: true) | ||
.find('a.current').parent().addClass('active'); | ||
}) | ||
.bind({ | ||
// set/unset proper Bootstrap classes for some menu elements | ||
'show.smapi': function(e, menu) { | ||
var $menu = $(menu), | ||
$scrollArrows = $menu.dataSM('scroll-arrows'), | ||
obj = $(this).data('smartmenus'); | ||
if ($scrollArrows) { | ||
// they inherit border-color from body, so we can use its background-color too | ||
$scrollArrows.css('background-color', $(document.body).css('background-color')); | ||
} | ||
$menu.parent().addClass('open' + (obj.isCollapsible() ? ' collapsible' : '')); | ||
}, | ||
'hide.smapi': function(e, menu) { | ||
$(menu).parent().removeClass('open collapsible'); | ||
}, | ||
// click the parent item to toggle the sub menus (and reset deeper levels and other branches on click) | ||
'click.smapi': function(e, item) { | ||
var obj = $(this).data('smartmenus'); | ||
if (obj.isCollapsible()) { | ||
var $item = $(item), | ||
$sub = $item.parent().dataSM('sub'); | ||
if ($sub && $sub.dataSM('shown-before') && $sub.is(':visible')) { | ||
obj.itemActivate($item); | ||
obj.menuHide($sub); | ||
return false; | ||
} | ||
} | ||
} | ||
}); | ||
|
||
}); | ||
|
||
// fix collapsible menu detection for Bootstrap 3 | ||
$.SmartMenus.prototype.isCollapsible = function() { | ||
return this.$firstLink.parent().css('float') != 'left'; | ||
}; | ||
|
||
})(jQuery); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.