Animated Sliding Active Menu Item Indicator In jQuery | Navigation Menu

Animated Active Menu Indicator – A recent scrolling navigation cursor that moves when you hover over or activate a menu item. Written in jQuery and CSS/CSS3.

Must Read: jQuery Sliding Display Your Content Like a Deck of Cards

jQuery Animated Sliding Active Menu Item Details

Post NameAnimated Active Menu Indicator
Author NameEricPorter
CategoryCodepen, Menu Plugins
Official PageClick Here
Publish DateSeptember 11, 2020
Last UpdateAugust 8, 2023
DownloadLink Below

How to make use of it:

1. Create an animated navigation menu from HTML.

<ul class="nav">
  <li><a href="#">Home</a></li>
  <li><a href="#">Web</a></li>
  <li><a href="#">Code</a></li>
  <li><a href="#">Flow</a></li>
  <li><a href="#">Navigation</a></li>
  <li class="slide1"></li>
  <li class="slide2"></li>

2. The needed types for the menu item indicator.

.nav .slide1,
.nav .slide2 

.nav .slide1 {
  background-color: #eeeeee30;
  z-index: 2;

.nav .slide2 
  opacity: 0;
  background-color: transparent;
  border: 1px solid #eeeeee70;
  z-index: 1;

3. Load the jQuery library.

<script src="/path/to/cdn/jquery.slim.min.js"></script>

4. The jQuery to activate the menu item.

$(".nav a").on("click", function () {
    var position = $(this).parent().position();
    var width = $(this).parent().width();
    $(".nav .slide1").css();

$(".nav a").on("mouseover", function () {
    var position = $(this).parent().position();
    var width = $(this).parent().width();
    $(".nav .slide2").css(
        opacity: 1,
        left: +position.left,
        width: width

$(".nav a").on("mouseout", function () {
    $(".nav .slide2").css({ opacity: 0 });

var currentWidth = $(".nav").find("li:nth-of-type(1) a").parent("li").width();
var current = $("li:nth-of-type(1) a").position();
$(".nav .slide1").css( left: +current.left, width: currentWidth );

See Demo And Download


Official Website(EricPorter): Click Here

This superior jQuery/javascript plugin is developed by EricPorter. For extra Advanced Usage, please go to the official website.

Related Posts


Interactive Data Table Generator with JS/jQuery and JSON | Tabulator

Tabulator allows you to create interactive tables in seconds from any HTML Table, JavaScript array, AJAX data source, or JSON format data. Just include the library in your…


Simple Alert, Confirm, Prompt Popup Using Vanilla JavaScript Library | attention.js

JavaScript provides various built-in functionality to display popup messages for different purposes. Attention JS is a vanillaJS plugin used to create a custom alert, confirm, or Prompt…


Bootstrap 4 Sidebar Menu Responsive Template | MDB

Bootstrap Side Navbar – Responsive sidebar template based on the Bootstrap 4 framework. An easy-to-use, totally responsive, Google Material Design impressed aspect navigation for modern web app…


Lightweight Bootstrap 4 Toast Notification Plugin | BS4 Advanced Toast

A lightweight Bootstrap 4 Toast Notification plugin integrated with JS/jQuery. bs4-toast.js is a JavaScript library that enhances the native Bootstrap toast component with icons, buttons, callbacks, and…


How to Create Audio Visualizations with JavaScript | Wave.js

Audio Visualizer Library – wave.js is a vanilla javascript audio visualization library that provides 20+ creative audio visualization effects to bring more engagement to your visitor. Contribute…


Bootstrap 5 Treeview Dynamically Collapsible | bs5treeview

Bootstrap 5 Tree View is a very simple plug-in for creating a basic and elegant Treeview using BS5. For use with Bootstrap 5, the attributes have been…

Leave a Reply

Your email address will not be published. Required fields are marked *