I have been experimenting with a Mega Menu code snippet that I found on this codepen link. Here is a small example of the menu HTML structure:
<div class="content">
<ul class="exo-menu">
<li>
<a class="active" href="#">
<i class="fa fa-home"></i>
Home
</a>
</li>
<li>
<a href="#">
<i class="fas fa-hand-holding-usd"></i>
Link 1
</a>
<div class="contact"></div>
</li>
<a href="#" class="toggle-menu visible-xs-block">|||</a>
</ul>
</div>
Additionally, here is the JavaScript function associated with the menu:
$(function () {
$('.toggle-menu').click(function(){
$('.exo-menu').toggleClass('display');
});
});
Although this menu works fine, I am interested in making it sticky at the top when scrolling.