Results 1 to 2 of 2

Thread: animate backgroundColor

Hybrid View

  1. #1
    Join Date
    Aug 2008
    Phoenix, AZ

    animate backgroundColor

    I have an even that I'm trying to run and it doesn't seem to be working for some reason. I've tried it a few times and have seen it work on other sites, and I'm not sure what I'm doing wrong. Here's the code that I'm using for it:

    HTML Code:
    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
    <script type="text/javascrupt" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    	$('div.small_event').hover( function() {
    			$(this).stop().animate({ backgroundColor: "#562D11"}, 500);
    		}, function () {
    			$(this).stop().animate({ backgroundColor: "#000000"}, 500);
    The color isn't changing and everything looks correct. Am I missing something?

    Oh, and I don't want to use any of those color plugin's that people keep seeming to talk about. I'd rather learn how to do this on my own.

  2. #2
    Join Date
    Aug 2008
    Phoenix, AZ
    Figured it out. It was in how I was pulling in my jquery. I now have it changed to //ajax.google.com instead of the https:#ajax.google.com.

    Stupid copy/paste error

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center

Recent Articles