Wegpoint CDN
//waypoint cdn
<script src="https://cdnjs.cloudflare.com/ajax/libs/waypoints/4.0.1/jquery.waypoints.min.js"></script>
//DOWN CODE IS STICKY MENU FOR
//(WHEN I NEED SCROLL ONE SECTION AFTER THEN TIGER STICKY MENU)
//js code
$("#service").waypoint(function (direction) {
if (direction == 'down') {
$('nav').addClass('sticky');
} else {
$('nav').removeClass('sticky');
}
});
// css code
.sticky {
position: fixed;
top: 0;
left: 0;
background: #834a8f;
width: 100%;
z-index: 1;
}
//CUSTOM CODE JS (WITHOUT PLUGIN)
//STICKY MENU JS CODE
$(window).scroll(function () {
if ($(this).scrollTop() > 650) {
$('nav').addClass('sticky');
} else {
$('nav').removeClass('sticky');
}
});
MD RAZZAK