Skip to content

NVJS_Menu - is the free and responsive menu script, which used for creating open/close menu and set events on it.

Notifications You must be signed in to change notification settings

R0mze5/NVJS_Menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NVJS_Menu

NVJS_Menu - is the free and responsive menu script, which used for creating open/close menu and set events on it.

  • No dependencies
  • All modern browsers are supported
  • Fully responsive

NVJS_Menu is not compatible with all platforms, because it used ES6. it is a modern menu which is focused only on modern apps/platforms to bring the best experience and simplicity.

Supported Browsers

  • Edge
  • Chrome
  • Safari
  • Mobile Safari
  • Android Default Browser

Dist / Build

Dist / Build description is available on Dist / Build documentation.

API

API description is available on API documentation.

Get Started

Include NVJS_Menu Files To Website/App

<!DOCTYPE html>
<html lang="en">
<head>
    ...
    <link rel="stylesheet" href="path/to/NVJS_Menu.css">
</head>
<body>
    ...
    <script src="path/to/NVJS_Menu.js"></script>
</body>
</html>

Add NVJS_Menu HTML Layout

<header class="header">
  <div class="header__wrapper">
    <a class="header__logo" href="/">Logo</a>
    <nav class="header__menu">
        <li class="header__menu__item">
            <a class="header__menu__link" href="/">
                Example 
            </a>
        </li>
        <li class="header__menu__item">
            <a class="header__menu__link" href="/">
                Example 
            </a>
        </li>
        <li class="header__menu__item">
            <a class="header__menu__link" href="/">
                Something Else 
            </a>
        </li>
    </nav>
    <div class="hamburger">
        <div class="hamburger__item"></div>
    </div>
  </div>
</header>

Initialize NVJS_Menu

let menu = new NVJSMenu('.header',{
	menuShowButtons: '.hamburger',
	menu: '.header__menu',
	menuOpenClass: 'open',
	autoInitialize: true,
	lockBody: true,
	on: {
		initialized: () => {
            console.log('initialized')
        },
		toggle: {
			elements: ['header', 'menuShowButtons', 'menu',
			activeClass: 'open',
			addClass: true
		},
		scroll: {
			sensivity: 20,
			activeClass: 'scrolled',
			addClass: true
		},
		scrollToTop: {
			activeClass: 'scrolledToTop',
		},
		scrollToBottom: {
			activeClass: 'scrolledToBottom',
		}
	}
}, true);

Changelog

Changelog is available on Changelog documentation.

License

NVJS_Menu is licensed WTFPL. You can use it for free and without any attribution, in any personal or commercial project. You may also fork the project and re-release it under another license you prefer.

About

NVJS_Menu - is the free and responsive menu script, which used for creating open/close menu and set events on it.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published