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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T10:37:13+00:00 2026-06-11T10:37:13+00:00

I am completely baffled as to why this simple jQuery script is not working.

  • 0

I am completely baffled as to why this simple jQuery script is not working. I literally copied and pasted the code from another project of mine (in which the code works) and just changed the class tag.

<html>
<head>
    <title>test page</title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $('.click_item').click(
                function() {
                    $(this).animate({background: '#ffffff'}, 200);
                },
                function() {
                    $(this).animate({background: '#d0d0d0'}, 200);
                }
            );
    }) 
    </script>
    <style type="text/css">
        #one {
            height: 300px;
            width: 1000px;
            background-color: #a0a0a0;
        }
        .click_item {
            width: 100px;
            height: 30px;
            margin: 0px auto;
            margin-bottom: 10px;
            background: #d0d0d0;
            -moz-transition: background linear;
            -webkit-transition: background linear;
        }
    </style>
</head>

<body>

    <div id="one">
        <div id="map_options_box">
            <div id="kml1" class="click_item">item 1</div>
            <div id="kml2" class="click_item">item 2</div>
        </div>
    </div>

</body>

I also tried using the #kml1 and #kml2 ID tags instead of class and ‘this’ tags, as well as replacing the click function with hover and toggle,still didn’t work. I’m not receiving any errors in the console either.

  • 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-11T10:37:14+00:00Added an answer on June 11, 2026 at 10:37 am

    You will need to include the jQuery color animations plugin., because native jquery does not support this feature

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

Sidebar

Related Questions

I'm completely baffled by observing this behaviour in my F# code, here taken from
This is super simple and I'm completely baffled by this behavior. I want my
Being new to jQuery (but not vanilla JS) I am completely baffled why the
I am completely baffled by this and don't fully understand IE7's problem. The page
For some reason, the retain/release behavior in the following code has me completely baffled.
I am completely baffled by this as I have coded several other methods using
Specifically a Multigraph . Some colleague suggested this and I'm completely baffled. Any insights
This is a snippet of code from an array library I'm using. This runs
Completely new to most of this stuff, but basically Im playing around with the
Not completely a programming question, but its close enough so here goes: In Mac

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.