Responsive Jquery Navigation
How do I make an responsive jquery navigation?
Responsive Jquery Navigation. What is a responsive jquery navigation? How do you make a responsive jquery navigation? This script and codes were developed by Kanha Sahu on 27 August 2022, Saturday.
Responsive Jquery Navigation - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Responsive Jquery Navigation</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src="http://code.jquery.com/jquery-latest.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<body>
<div id='cssmenu'>
<ul> <li><a href='#'>Home</a></li> <li class='active has-sub'><a href='#'>Products</a> <ul> <li class='has-sub'><a href='#'>Product 1</a> <ul> <li><a href='#'>Sub Product</a></li> <li><a href='#'>Sub Product</a></li> </ul> </li> <li class='has-sub'><a href='#'>Product 2</a> <ul> <li><a href='#'>Sub Product</a></li> <li><a href='#'>Sub Product</a></li> </ul> </li> </ul> </li> <li><a href='#'>About</a></li> <li><a href='#'>Contact</a></li>
</ul>
</div>
</body> <script src="js/index.js"></script>
</body>
</html>
Responsive Jquery Navigation - Script Codes CSS Codes
@import url(http://fonts.googleapis.com/css?family=Raleway:400,200);
#cssmenu,
#cssmenu ul,
#cssmenu ul li,
#cssmenu ul li a { margin: 0; padding: 0; border: 0; list-style: none; line-height: 1; display: block; position: relative; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
}
#cssmenu { width: 220px; font-family: Raleway, sans-serif; color: #ffffff;
}
#cssmenu ul ul { display: none;
}
#cssmenu > ul > li.active > ul { display: block;
}
.align-right { float: right;
}
#cssmenu > ul > li > a { padding: 16px 22px; cursor: pointer; z-index: 2; font-size: 16px; text-decoration: none; color: #ffffff; background: #3ab4a6; -webkit-transition: color .2s ease; -o-transition: color .2s ease; transition: color .2s ease;
}
#cssmenu > ul > li > a:hover { color: #d8f3f0;
}
#cssmenu ul > li.has-sub > a:after { position: absolute; right: 26px; top: 19px; z-index: 5; display: block; height: 10px; width: 2px; background: #ffffff; content: ""; -webkit-transition: all 0.1s ease-out; -moz-transition: all 0.1s ease-out; -ms-transition: all 0.1s ease-out; -o-transition: all 0.1s ease-out; transition: all 0.1s ease-out;
}
#cssmenu ul > li.has-sub > a:before { position: absolute; right: 22px; top: 23px; display: block; width: 10px; height: 2px; background: #ffffff; content: ""; -webkit-transition: all 0.1s ease-out; -moz-transition: all 0.1s ease-out; -ms-transition: all 0.1s ease-out; -o-transition: all 0.1s ease-out; transition: all 0.1s ease-out;
}
#cssmenu ul > li.has-sub.open > a:after,
#cssmenu ul > li.has-sub.open > a:before { -webkit-transform: rotate(45deg); -moz-transform: rotate(45deg); -ms-transform: rotate(45deg); -o-transform: rotate(45deg); transform: rotate(45deg);
}
#cssmenu ul ul li a { padding: 14px 22px; cursor: pointer; z-index: 2; font-size: 14px; text-decoration: none; color: #dddddd; background: #49505a; -webkit-transition: color .2s ease; -o-transition: color .2s ease; transition: color .2s ease;
}
#cssmenu ul ul ul li a { padding-left: 32px;
}
#cssmenu ul ul li a:hover { color: #ffffff;
}
#cssmenu ul ul > li.has-sub > a:after { top: 16px; right: 26px; background: #dddddd;
}
#cssmenu ul ul > li.has-sub > a:before { top: 20px; background: #dddddd;
}
Responsive Jquery Navigation - Script Codes JS Codes
(function($){
$(document).ready(function(){
$('#cssmenu li.active').addClass('open').children('ul').show(); $('#cssmenu li.has-sub>a').on('click', function(){ $(this).removeAttr('href'); var element = $(this).parent('li'); if (element.hasClass('open')) { element.removeClass('open'); element.find('li').removeClass('open'); element.find('ul').slideUp(200); } else { element.addClass('open'); element.children('ul').slideDown(200); element.siblings('li').children('ul').slideUp(200); element.siblings('li').removeClass('open'); element.siblings('li').find('li').removeClass('open'); element.siblings('li').find('ul').slideUp(200); } });
});
})(jQuery);
Developer | Kanha Sahu |
Username | kaslab |
Uploaded | August 27, 2022 |
Rating | 3 |
Size | 2,547 Kb |
Views | 32,384 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Select all using Jquery Function | 2,816 Kb |
Dynamicdrive marquee II | 2,759 Kb |
JavaScript Validation Example | 2,561 Kb |
Bootstrap tree | 2,925 Kb |
Jquery Models for login, signin, forgot password | 4,195 Kb |
Awesome responsive navigation menu bar | 2,412 Kb |
Button jquery onclick change text and effect | 2,083 Kb |
Rainbow hr | 1,743 Kb |
Bootstrap Navigation | 2,293 Kb |
Stylish Login Panel using SCSS | 3,620 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Loading animation | Codeams | 2,408 Kb |
Javascript Welcome | Peterlewicki | 1,573 Kb |
Canvas stripes | Adrianparr | 1,948 Kb |
Tooltip in table | Roine | 3,713 Kb |
Lunar eclipse | Ademilter | 2,056 Kb |
Social buttons | Flacu | 2,022 Kb |
A Pen by Bryan Rojas | Bryanrojas | 1,873 Kb |
Next Word Predictor | Rfalor | 2,776 Kb |
Medium Menu | Lucasmotta | 3,923 Kb |
Vue.js Lazy Loading | Kjbrum | 3,620 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!