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 8199797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:14:41+00:00 2026-06-07T06:14:41+00:00

I am trying to have text appear in a <div> when you hover over

  • 0

I am trying to have text appear in a <div> when you hover over an <li> in a different <div> For some reason its not working. It should take the data-name from the <li> and pass it to .pagename_h1 using html()…heres the code:

list item
<li id="navIcon" data-name="News"><a class='inline' href="#inline_content"><img src="images/christian.jpg" class="hoverImages"></a></li>

list item
<script>$('.navIcon').hover(
function () {
$('.pagename_h1').html($(this).attr('data-name'));
});
</script>

the div where the data-name should show up in text
<section class="round">
<div class="pagename_h1"> </div>
</section>

Am i using the CSS selector correctly for .pagename_h1? Should I be using something other than hover instead? Is .html() not the proper function to replace text?

  • 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-07T06:14:42+00:00Added an answer on June 7, 2026 at 6:14 am

    Your navIcon is an ID not a class.

    Change it to $('#navIcon').hover()

    Read more about jQuery selectors, specifically Class Selector and ID Selector

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to have text spans pop up on a hover pseudo-class for different
So I'm trying to have a background image disappear and then have some text
I have been trying to make a DIV box appear in front of the
I'm trying to display some text in a div named msg_box for each selected
I am trying to have a text box resize on click. in the head:
I have a text file of full of sentences and I am trying to
I have this text read into an NSString *responce which I am trying to
I have a text file that contains cached data in JSON format. I'm trying
I'm trying to have my application read through a text file and look for
I've been trying to have a default value in a text input, then with

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.