K-Responsive-Menu

Working on Bootstrap 4

k-responsive-menu is a lightweight jQuery plugin to create responsive multi - level navigation menus with multi device support, By Bao Nguyen http://baonguyenyam.github.io/.

k-responsive-menu comes with 2 variants like horizontal, vertical menu. It gives complete responsive menu solution for any kind of websites or admin templates. The plugin has clean and well commented valid code, easy to Integrate and modify.


Features


  • Fully Responsive multi-level Menu
  • Menu Styles: Horizontal, Vertical menu
  • Icon Support [Integrated with FontAwesome]
  • Click / Hover Events
  • Lightweight jQuery script
  • Events
  • Valid HTML5 and CSS3
  • Bootstrap Compatible
  • Easy to Integrate & customize
  • Cross-browser support
  • Clean and well commented code
  • Help documentation

Compatible Browsers

This menu has been tested and works with all the following browsers:

  • Internet Explorer 7+
  • Firefox 3+
  • Chrome 4+
  • Safari 4+
  • Opera 10+

Gettings started

This Plugins required Bootstrap Framework


Install via Bower
bower i k-responsive-menu -S
CSS

Copy-paste the stylesheet <link> into your <head> before all other stylesheets to load our CSS.

<link rel="stylesheet" href="./bower_components./css/k-responsive-menu.css">
JS

Place the following <script> near the end of your pages, right before the closing </body> tag, to enable them. jQuery must come first, then k-responsive-menu.js, and then our JavaScript plugins.

<script src="./bower_components./js/k-responsive-menu.js">

Demo Horizontal


Basic
Toggle menu basic
Basic with form
Toggle menu with form inline
Fluid
Toggle menu with container fluid
Push Left
Push left menu
Push Right
Push right menu
Push Left + Pull Main
Push left menu and pull main tag
Push Right + Pull Main
Push right menu and pull main tag
Map to
Menu Map
BackDrop
Menu BackDrop
Using Attribute
Without JS Options only using Attribute

Demo Vertical


Basic
Toggle menu basic
Basic with form
Toggle menu with form inline
Push right
Toggle menu with form inline

APIs


JS Default value
$(document).ready(function() {
  $('#demoResAllInOneMenu').kResponsiveMenu({
    animationSpeed: 'slow', 
    resizeWidth: 768, 
    menuType: 'toggle',
    menuFloat: false,
    menuPush: null,
    menuPushPosition: 'absolute', 
    menuPushWidth: '100%',
    menuBackDrop: false, 
    menuIcon: null, 
    onComplete: null,
    onResize: null,
    onResizeEnd: null,
    onClick: null,
    onHover: null,
    unHover: null,
    onBegin: null,
    onChange: null
  });
});
Value
# Value Default Setting
1 animationSpeed 'slow' 'slow', 'fast', 200...
2 resizeWidth 768 'xs', 'sm', 'md', 'lg', 'xl', 480...
3 menuType 'toggle' 'horizontal', 'vertical', 'toggle'
4 menuFloat false true/false
5 menuPush null 'right', 'left'
6 menuPushPosition 'absolute' 'fixed'
7 menuPushWidth '100%' 'px', '%', 'rem'
8 menuBackDrop false true/false
9 menuIcon null '<i class='fa fa-bars'></i>'
Events
# Value Default Setting
1 onComplete
onResize
onResizeEnd
onClick
onHover
unHover
onBegin
onChange
null onResize: function () {}

View details

Default Attribute
[k-toggle-for]
Toggle menu have [k-toggle-for] value
[k-menu-map-to]
On the mobile where contents have attribute [k-menu-map-to] will be auto clone to target element value
Using Attribute only
[k-responsive-menu]
true
[k-menu-resize]
700 OR 'xs', 'sm', 'md', 'lg', 'xl'
[k-menu-icon]
<i class='fa fa-bars'></i>
[k-menu-speed]
'slow' OR 'fast', 500
[k-menu-width]
'250px' OR '100%', '40rem'
[k-menu-push]
'left' OR 'right'
[k-menu-position]
'fixed' OR 'absolute'

Licence

Copyright © 2018 Bao Nguyen

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Bảo Nguyên