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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:07:57+00:00 2026-05-31T04:07:57+00:00

I never use jQuery before so I ask a friend to help me with

  • 0

I never use jQuery before so I ask a friend to help me with some small project I’m working on, I wanted to load different pictures when you hover over buttons, and you can see how that works on our site. It works fine with FF and Opera, I have tested in Chrome as well, but when I try it from my machine locally it works great, but as soon as I put it on the server the pictures in Chrome and IE start to disappear when you change buttons. Here’s the code I use:

<div id="wraper">
    <div id="nav">
        <div id="left">
            <script>
                $(document).ready(function() {
                    $('#left').hover(
                        function(){
                            $('#nav').css({'background-image' : 'url(img/serbia.png)'});
                        },
                        function(){
                            $('#nav').css({"backgroundImage" : "url(img/inactivebutton.png)"});
                        }
                    );
                });

                $(document).ready(function() {
                    $('#right').hover(
                        function(){
                            $('#nav').css({'background-image' : 'url(img/english.png)'});
                        },
                        function(){
                            $('#nav').css({"backgroundImage" : "url(img/inactivebutton.png)"});
                        }
                    );
                });
            </script>
            <a href="index_sr.html" ></a>
        </div>

        <div id="right">
            <a href="index_en.html" ></a>
        </div>
    </div>
</div>

Can anyone point out what I’m doing wrong?

Thanks

  • 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-31T04:07:58+00:00Added an answer on May 31, 2026 at 4:07 am

    It’s not an issue with Jquery. It’s natural process because when you hover over the link then it send an new other HTTPS request to the server. It’s good if your use css sprite images for this.

    Read this article for this http://css-tricks.com/css-sprites/

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

Sidebar

Related Questions

I'm currently working with MVC 1.0 and have never worked with AJAX before and
I have written some code using jQuery to use Ajax to get data from
I use this script daily and never had an issue before now. Ive been
I use only classes and never use IDs. Many people like to use IDs
How do I make vi - Vim never use tabs (converting spaces to tabs,
I read somewhere that one should never use error conditions as normal program flow.
I've been using user controls extensively but never use a HttpHandler and was wondering
I have noticed that most Objective-C coders never use the self->ivar syntax when accessing
From what I can gather, there are three categories: Never use GET and use
I've been building .NET web applications for many years now, and I never use

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.