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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:41:31+00:00 2026-06-02T14:41:31+00:00

I am developing an application where I have the next JS code: <!DOCTYPE html

  • 0

I am developing an application where I have the next JS code:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>jQuery Hover Effect</title>
<script type='text/javascript' src="/var/www/JSPROBAK/jquery.js"></script>
<script type='text/javascript'>
$(document).ready(function(){
    $(".button").hover(function() {
        $(this).attr("src","/var/www/JSPROBAK/button-hover.png");
            }, function() {
        $(this).attr("src","/var/www/JSPROBAK/button.png");
    });
});
</script>
</head>

<body>
<img src="/var/www/JSPROBAK/button.png" alt="My button" class="button" />
</body>
</html>

The directory where I have button.png, button-hover.png and jquery.js is the one specified in the code. The code is supposed to turn a gray button (button.png) into a red button (button-hover.png) when putting the mouse over the gray button. The browser initially shows the image of the gray button but doesn’t turn red when putting the mouse over it so I am assuming jquery.js is not being loaded correctly, any idea?

  • 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-02T14:41:32+00:00Added an answer on June 2, 2026 at 2:41 pm

    It would appear that you are referencing the server file location not the website relative location. if you are hosting the website from the www dir then I would try this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>jQuery Hover Effect</title>
    <script type='text/javascript' src="/JSPROBAK/jquery.js"></script>
    <script type='text/javascript'>
    $(document).ready(function(){
        $(".button").hover(function() {
            $(this).attr("src","/JSPROBAK/button-hover.png");
                }, function() {
            $(this).attr("src","/JSPROBAK/button.png");
        });
    });
    </script>
    </head>
    
    <body>
    <img src="/JSPROBAK/button.png" alt="My button" class="button" />
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing application using backbone.js & jquery. I have following code in model: runReport:
While developing my WordPress application i have a requirement where i need to show
I'm developing an iPhone application that have a TabBarController with two tabs. Each tab
I am developing an xbap application and have run into a problem with users
I am developing an application where i have to show iAds in all the
I have been developing Android application for Android 3.x and now I want to
I'm developing a .NET application that will have both a WinForms and a Silverlight
I am developing an application in which i have to get data from .xls
I am developing android application in which i have to open option menu from
I'm developing an iPhone application where I have a bunch of images bundled 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.