Menu list in javascript

Содержание
  1. 68 JavaScript Menus
  2. Related Articles
  3. Author
  4. Links
  5. Made with
  6. About a code
  7. Progress Nav Concept Using the Intersection Observer API
  8. Author
  9. Links
  10. Made with
  11. About a code
  12. Vector/ Project Selection
  13. Author
  14. Links
  15. Made with
  16. About a code
  17. Travel Video Landing Page
  18. Author
  19. Links
  20. Made with
  21. About a code
  22. Twitter Sidebar
  23. Author
  24. Links
  25. Made with
  26. About a code
  27. Slide-out Navigation with GSAP 3
  28. Author
  29. Links
  30. Made with
  31. About a code
  32. Button Hover Effect
  33. Author
  34. Links
  35. Made with
  36. About a code
  37. Endless Wheel Navigation Built With AlpineJS and TailwindCSS
  38. Author
  39. Links
  40. Made with
  41. About a code
  42. Menu to Inner Page Animation with Image Grid Background
  43. Author
  44. Links
  45. Made with
  46. About a code
  47. Full Screen Navigation Bar
  48. Author
  49. Links
  50. Made with
  51. About a code
  52. Menu Navigation Animation
  53. Author
  54. Links
  55. Made with
  56. About a code
  57. Travel/Tracking Website Landing Page
  58. Author
  59. Links
  60. Made with
  61. About a code
  62. Context Menu
  63. Author
  64. Links
  65. Made with
  66. About a code
  67. Fancy Navigation
  68. Author
  69. Links
  70. Made with
  71. About a code
  72. Image Hover Navigation
  73. Author
  74. Links
  75. Made with
  76. About a code
  77. The 3D Navigation Animation
  78. Author
  79. Links
  80. Made with
  81. About a code
  82. Jumping Gooey Navigation
  83. Author
  84. Links
  85. Made with
  86. About a code
  87. Full Screen Overlay Navigation
  88. Author
  89. Links
  90. Made with
  91. About a code
  92. Nav Stretch
  93. Author
  94. Links
  95. Made with
  96. About a code
  97. Bold Hover Animations with Splitting.js
  98. Author
  99. Links
  100. Made with
  101. About a code
  102. Link Hover Interaction
  103. Author
  104. Links
  105. Made with
  106. About a code
  107. Menu Hover Interaction
  108. Author
  109. Links
  110. Made with
  111. About a code
  112. Menu Image Animation on Hover
  113. Author
  114. Links
  115. Made with
  116. About a code
  117. Grid Navigation
  118. Author
  119. Links
  120. Made with
  121. About a code
  122. The Context Menu
  123. Author
  124. Links
  125. Made with
  126. About a code
  127. An Infinitely Scrollable Vertical Menu
  128. Author
  129. Links
  130. Made with
  131. About a code
  132. Responsive Navigation with Animations
  133. Author
  134. Links
  135. Made with
  136. About a code
  137. Expandable Menu
  138. Author
  139. Links
  140. Made with
  141. About a code
  142. Header Underline
  143. Author
  144. Links
  145. Made with
  146. About a code
  147. Staggered Blink Text Menu
  148. Author
  149. Links
  150. Made with
  151. About a code
  152. SVG Navigation
  153. Author
  154. Links
  155. Made with
  156. About a code
  157. Paper Pieces Navigation Menu
  158. Author
  159. Links
  160. Made with
  161. About a code
  162. Full Page Navigation
  163. Author
  164. Links
  165. Made with
  166. About a code
  167. Window Shade Navigation
  168. Author
  169. Links
  170. Made with
  171. About a code
  172. Full-Page Nav Stacking Animation
  173. Author
  174. Links
  175. Made with
  176. About a code
  177. Full-Page Navigation
  178. Author
  179. Links
  180. Made with
  181. About a code
  182. Flip Navigation
  183. Author
  184. Links
  185. Made with
  186. About a code
  187. Sticky ScrollSpy Navigation
  188. Author
  189. Links
  190. Made with
  191. About a code
  192. CSS Nav Animation
  193. Author
  194. Links
  195. Made with
  196. About a code
  197. Header Nav Overflow Into Mobile Nav
  198. Author
  199. Links
  200. Made with
  201. About a code
  202. Nav Menu with Circular Reveal Animation
  203. Author
  204. Links
  205. Made with
  206. About a code
  207. Menu Interaction
  208. Author
  209. Links
  210. Made with
  211. About a code
  212. Navigation & Sub-navigation
  213. Author
  214. Links
  215. Made with
  216. About a code
  217. Clicky Menus
  218. Author
  219. Links
  220. Made with
  221. About a code
  222. Draggable Menu with Image Grid Previews
  223. Author
  224. Links
  225. Made with
  226. About the code
  227. Interactive Radial Menu
  228. Author
  229. Links
  230. Made with
  231. About the code
  232. Creative Hamburger Menu
  233. Author
  234. Links
  235. Made with
  236. About the code
  237. Nice Effect For Navigation
  238. Author
  239. Links
  240. Made with
  241. About a code
  242. Navigation with SVG
  243. Author
  244. Links
  245. Made with
  246. About a code
  247. Ribbon Menu
  248. Author
  249. Links
  250. Made with
  251. About the code
  252. Jelly Menu
  253. Author
  254. Links
  255. Made with
  256. About the code
  257. Navigation Buttons
  258. Author
  259. Links
  260. Made with
  261. About the code
  262. Code Menu
  263. Author
  264. Links
  265. Made with
  266. About the code
  267. CSS Grid Menu Panels
  268. Author
  269. Links
  270. Made with
  271. About the code
  272. Dropdown Menu
  273. Author
  274. Links
  275. Made with
  276. About the code
  277. Responsive Sidebar/Navbar
  278. Author
  279. Links
  280. Made with
  281. About the code
  282. Off-Canvas Navigation w/Page Transitions
  283. Author
  284. Links
  285. Made with
  286. About the code
  287. Sidebar Template
  288. Author
  289. How TO — Clickable Dropdown
  290. Dropdown
  291. Create a Clickable Dropdown
  292. Example
  293. Example Explained
  294. Example
  295. Example Explained
  296. Example
Читайте также:  Php zip извлечь все файлы

68 JavaScript Menus

Collection of free vanilla JavaScript navigation menu code examples: responsive, animated, dropdown, sticky and full page. Update of April 2020 collection. 35 new items.

Author

Made with

About a code

Progress Nav Concept Using the Intersection Observer API

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Vector/ Project Selection

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Travel Video Landing Page

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Twitter Sidebar

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Slide-out Navigation with GSAP 3

Compatible browsers: Chrome, Edge, Opera, Safari

Author

Made with

About a code

Button Hover Effect

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Endless Wheel Navigation Built With AlpineJS and TailwindCSS

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: tailwind.css, alpine.js

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Full Screen Navigation Bar

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Travel/Tracking Website Landing Page

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Context Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Fancy Navigation

Fancy navigation with hover effects.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Image Hover Navigation

Intro animation duration stagger. Mouse position tracking with CSS variables. Text outline reveal on hover.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

The 3D Navigation Animation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Jumping Gooey Navigation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Full Screen Overlay Navigation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Bold Hover Animations with Splitting.js

Added Splitting.js to incorporate other silly animation ideas on hover.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: splitting.css, splitting.js

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: locomotive-scroll.css, imagesloaded.js, locomotive-scroll.js, gsap.js

Author

Made with

About a code

A hover effect for a menu where images appear with an animation on each item.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Grid Navigation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

The Context Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

An Infinitely Scrollable Vertical Menu

A quick look at how an infinitely scrollable menu works based on a looping scroll illusion of cloned items.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Responsive Navigation with Animations

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Expandable Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Header Underline

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

SVG Navigation

Tinker with SVG syntax, the textPath element and the startOffset attribute to create an intriguing navigation. Animated with anime.js.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Paper Pieces Navigation Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Full Page Navigation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Window Shade Navigation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Full-Page Nav Stacking Animation

A nav menu concept in which the three bars fill up the screen. This happens in a way that looks like blocks being stacked. When collapsing the menu, the sequence is reversed.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Full-Page Navigation

Created full-page navigation using anime.js and some SVGs.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Flip Navigation

A bit laggy on initial flip though.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Sticky ScrollSpy Navigation

Smooth scrolling sticky scrollspy navigation.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

CSS Nav Animation

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Header Nav Overflow Into Mobile Nav

The idea behind this header nav is to move items that no longer fit into a navigation drawer/mobile nav. The trick behind it is to give the header a set height and allow the header nav items to wrap, but hide the overflow. Then use JavaScript to check for any items that have wrapped and reveal them in the drawer/mobile nav.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Clicky Menus

Clicky menus: accessible and progressively enhanced menu with clicky dropdowns.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Draggable Menu with Image Grid Previews

A draggable inline menu with a scattered thumbnail preview of an image grid.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Dependencies: imagesloaded.js, charming.js, tweenmax.js, draggabilly.js

Author

Made with

About the code

Interactive Radial Menu

Interactive radial menu in HTML, CSS and JS.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Creative Hamburger Menu

Hamburger menu using the new clip-path CSS property.

Compatible browsers: Chrome, Edge (partial), Firefox, Opera, Safari

Author

Made with

About the code

Nice Effect For Navigation

Excellent hover and click effect for navigation bar or other.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

SVG used to animate a navigation bar. Effects are triggered on hover and click.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About a code

Ribbon Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Jelly Menu

Jelly menu concept in HTML, CSS and JS.

Compatible browsers: Chrome, Edge (partial), Firefox, Opera, Safari

Author

Made with

About the code

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

Code Menu

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Author

Made with

About the code

CSS Grid Menu Panels

Animated CSS grid-based menu panels. Click the toggle in the top left corner to see it in action.

Compatible browsers: Chrome, Edge, Firefox, Opera, Safari

Demo image: Dropdown Menu

Author

Made with

About the code

Author

Made with

About the code

Responsive Sidebar/Navbar

Vertical/Horizontal responsive sidebar/navbar.

Demo image: Off-Canvas Navigation w/Page Transitions

Author

Made with

About the code

Off-Canvas Navigation w/Page Transitions

More experimentation with transitions and navigation. Decided to add in a little bit for page transitions as well.

Author

Made with

About the code

Sidebar template with drop down menu based on Bootstrap.

Author

Источник

How TO — Clickable Dropdown

Learn how to create a clickable dropdown menu with CSS and JavaScript.

A dropdown menu is a toggleable menu that allows the user to choose one value from a predefined list:

Create a Clickable Dropdown

Create a dropdown menu that appears when the user clicks on a button.

Step 1) Add HTML:

Example

Example Explained

Use any element to open the dropdown menu, e.g. a , or

element.

Use a container element (like ) to create the dropdown menu and add the dropdown links inside it.

Wrap a element around the button and the to position the dropdown menu correctly with CSS.

Step 2) Add CSS:

Example

/* Dropdown Button */
.dropbtn background-color: #3498DB;
color: white;
padding: 16px;
font-size: 16px;
border: none;
cursor: pointer;
>

/* The container — needed to position the dropdown content */
.dropdown position: relative;
display: inline-block;
>

/* Dropdown Content (Hidden by Default) */
.dropdown-content display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
>

/* Links inside the dropdown */
.dropdown-content a color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
>

/* Change color of dropdown links on hover */
.dropdown-content a:hover

/* Show the dropdown menu (use JS to add this class to the .dropdown-content container when the user clicks on the dropdown button) */
.show

Example Explained

We have styled the dropdown button with a background-color, padding, hover effect, etc.

The .dropdown class uses position:relative , which is needed when we want the dropdown content to be placed right below the dropdown button (using position:absolute ).

The .dropdown-content class holds the actual dropdown menu. It is hidden by default, and will be displayed on hover (see below). Note the min-width is set to 160px. Feel free to change this. Tip: If you want the width of the dropdown content to be as wide as the dropdown button, set the width to 100% (and overflow:auto to enable scroll on small screens).

Instead of using a border, we have used the box-shadow property to make the dropdown menu look like a «card». We also use z-index to place the dropdown in front of other elements.

Step 3) Add JavaScript:

Example

/* When the user clicks on the button,
toggle between hiding and showing the dropdown content */
function myFunction() document.getElementById(«myDropdown»).classList.toggle(«show»);
>

// Close the dropdown menu if the user clicks outside of it
window.onclick = function(event) if (!event.target.matches(‘.dropbtn’)) var dropdowns = document.getElementsByClassName(«dropdown-content»);
var i;
for (i = 0; i < dropdowns.length; i++) var openDropdown = dropdowns[i];
if (openDropdown.classList.contains(‘show’)) openDropdown.classList.remove(‘show’);
>
>
>
>

Источник

Оцените статью