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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:34:27+00:00 2026-05-24T06:34:27+00:00

This is probably something ridiculously stupid, but I’ve gone over this code again and

  • 0

This is probably something ridiculously stupid, but I’ve gone over this code again and again, and can’t seem to figure why it won’t work.

Here’s my JS:

$(document).ready( function() {
    $("#flame").hover( function() 
    { $(this).removeClass("normal").addClass("hover"); }
    );
});

And my HTML:

<a href="javascript:void()">
<div id="flame" class="normal"></div>
</a>

Any my CSS, for good measure:

#flame {
    margin:auto;
    width: 180px;
    height: 218px;
}

.normal {
    background: url(../images/flame_normal.png);
}

.hover {
    background: url(../images/flame_hover.png);
}

I’ve used the same jQuery effect enough times, I’ve even got another js file I created with a similar source code, yet I can’t understand why it’s not working.

  • 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-24T06:34:27+00:00Added an answer on May 24, 2026 at 6:34 am

    Prior to jQuery 1.4, .hover() takes 2 functions. Add the second one and you should be fine.

    $(document).ready( function() {
        $("#flame").hover(function() { 
                   $(this).removeClass("normal").addClass("hover"); 
               }, function() {
                   $(this).removeClass("hover").addClass("normal"); 
    
          });
    });
    

    Also, you can handle this in css alone (browser support is limited though):

    #flame {
       ...
       background: url(../images/flame_normal.png);
    }
    
    #flame:hover {
       background: url(../images/flame_hover.png);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is probably something stupid, but i can't figure it out. I'm getting a
This is probably something simple, but I can't seem to find the answer. I
I get the feeling this is probably something I should know but I can't
I'm probably doing something realy stupid but I cant get this to work: var
This is something stupid I probably should know, but Googling fails me: When compiling
This is probably something quite easy to resolve, but for some reason, I can't
Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'dbuser1'@'localhost This is probably something stupid, but
This is probably something extremely simple but I can't get my head around it
This is probably something stupid, but I don't know nearly enough about rails &
Hi everyone this is probably something extremely simple that i'm overlooking but can someone

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.