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

  • SEARCH
  • Home
  • 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 7188537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:06:24+00:00 2026-05-28T19:06:24+00:00

How to replace home button with another text when I hover by mouse on

  • 0

How to replace “home” button with another text when I hover by mouse on it instead of it repeating itself?

<ul class="topnav">
<li><a href="#">Home</a></li>
</ul>


jQuery(function($) {

    $('.topnav li').find('a[href]').parent().each(function(span, li){
        li = $(li); span = $('<span>' + li.find('a').html() + '<\/span>');
        li.hover(function(){
        span.stop().animate({marginTop: '-60'}, 250);
        }, function(){
        span.stop().animate({marginTop: '0'}, 250);
        }).prepend(span);
    });

});

Here is the example: http://jsfiddle.net/fxdigi/3YNHp/1/

  • 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-05-28T19:06:25+00:00Added an answer on May 28, 2026 at 7:06 pm

    Check my variant http://jsfiddle.net/3YNHp/5/

    It uses markup:

    <ul class="topnav">
        <li>
            <a href="#" data-hover-text="Mohe">Home</a>
        </li>
    </ul>
    

    And changed javascript:

    $('.topnav li').find('a[href]').parent().each(function() {
        var li   = $(this),
            a    = li.find('a'),
            span = $('<span>' + a.data('hover-text') + '<\/span>');
    
        li.hover(function() {
            a.stop().animate({marginTop: '-64'}, 250);
        },
        function() {
            a.stop().animate({marginTop: '0'}, 250);
        })
        .append(span);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

jQuery(document).ready(function(){ jQuery('.breadcrumbs').text(function (i, old) { return old .replace('Your-Space', 'Your Space') }); }); I have
public class download { public static void Download() { final String saveTo = System.getProperty(user.home).replace(\\,
I have the following intentionally trivial function: void ReplaceSome(ref string text) { StringBuilder sb
I just created my own Home to replace the stock android one or Sense.
I am trying to integrate JQuery tabs with my WordPress blog, to replace old
I am trying to replace an image with another image on rollover and use
or How to simulate a home button pressed event? I need to restart my
Okay here is my url: http://example.com/home/process_login I would like to replace the underscore with
How do I replace two double quotes into single one using jQuery? For example:
I have a home button on my scene which when pressed goes to the

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.