Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8637665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T10:31:55+00:00 2026-06-12T10:31:55+00:00

I have this jquery code. //this is the main javascript $(document).ready(function(){ $(‘nav.menu a’).hover( function

  • 0

I have this jquery code.

//this is the main javascript

$(document).ready(function(){

    $('nav.menu a').hover(
        function () {
            $('nav.menu').find(".current_item").removeClass("current_item");
            $(this).addClass("current_item");

        }, 
        function () {
            $(this).removeClass("current_item");
            $('nav.menu').find(".damenu").addClass("current_item")
        }
);

});

and this html structure

<nav class="menu">
    <a href="home.html" class="current_item damenu">Home</a>
    <a href="gallery.html">Gallery</a>
    <a href="home.html">Portfolio</a>
    <a href="home.html">About</a>
    <a href="home.html">Contact</a>
</nav>

and this css

.menu
{
background: 1px solid #00ffff;
width: 100%;
padding: 0px 0px 0px 10px;
}
.menu a
{
padding: 8px;
color: #0099ff;
font: bold 20px Archivo Narrow, Arial Rounded MT, Tahoma, Calibri, Asap, Arial,     Verdana, sans-serif;
text-decoration: none;
float: left;
margin-right: 8px;
text-shadow: 2px 1px 1px #ffffff;
border-top: 3px solid transparent;
border-bottom: 3px solid transparent;
}
.current_item /*, .menu a:hover*/
{
color: #C5F700 !important;
border-top: 3px solid #C5F700 !important;
border-bottom: 3px solid #C5F700 !important;
}

as you can see, the routine is this, there is a class for the current menu and whenever a user hover into one of the menu, the class of the current menu is removed and a class “current_item” added to the current hover menu and in mouseout event, the class “current_item” is removed from the current hovered element and the class “current_item” is added back to the current menu which has also a class of “damenu” and as you can see the work of the class “current_item” is to add top and bottom borders and it works good, but I want to add some animation into the borders or in the class “current_item” when mouseover or in mouseout.

So precisely, I want to animate the borders or the class “current_item” whenever in mouseover or mouseout event and also, is there anyway I can make the nav into center?

I am open in, Ideas, recommendation and suggestion. Hope someone here could help, thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T10:31:57+00:00Added an answer on June 12, 2026 at 10:31 am

    You may animate border by only css

    .menu
    {
    background: 1px solid #00ffff;
    width: 100%;
    padding: 0px 0px 0px 10px;
    }
    .menu a
    {
    padding: 8px;
    color: #0099ff;
    font: bold 20px Archivo Narrow, Arial Rounded MT, Tahoma, Calibri, Asap, Arial,     Verdana, sans-serif;
    text-decoration: none;
    float: left;
    margin-right: 8px;
    text-shadow: 2px 1px 1px #ffffff;
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
    -webkit-transition: 1s all ease;
    -moz-transition: 1s all ease;
    -ms-transition: 1s all ease;
    -o-transition: 1s all ease;
    transition: 1s all ease;
    }
    .menu a.current_item, .menu a:hover
    {
    color: #C5F700 !important;
    border-top: 3px solid #C5F700 ;
    border-bottom: 3px solid #C5F700 ;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this jQuery code: $(document).ready(function() { $.ajax({ url: pages/+page+.php, cache: false }).done(function( html
Suppose I have this jQuery code. $(document).delegate('a[title]', 'click', function(event) { var txt = //
On my main page I have this jquery code which does an ajax call
I have this jQuery code in my JSP page (jQuery 1.7.2) : function Header()
i have this jquery code $(#eioShowLink).on('click',function(){ $(#ioEditRelatedConcepts).html(''); $.getJSON(http://localhost/Mar7ba/Ontology/getRelatedConceptsAndRelations/+conceptName+/TRUE, function(data){ var concepts = data[0]; var
I have this Javascript/JQuery code: <script type=text/javascript src=http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js></script> <script type=text/javascript> name = $(#name).val(); alert(Name:
I have this JQuery code working however I need to know whether how to
I have this jQuery datepicker code that initially set the minDate of the datepicker.
I have this code: jQuery: var mouseDown=false; var lastPositionX; var lastPositionY; var newX; var
Is there a better way to do this jquery code? Currently I have to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.