1

I am trying to make the example from jquery-color work, but it's giving me the $.Color is not a function error. What am I doing wrong?

Relevant code bit:

$("#sat").click(function(){
  $("#block").animate({
      backgroundColor: $.Color({ saturation: 0 })
  }, 1500 );
});

1 Answer 1

2

Looks like you did not reference correctly the javascript file, or not in the correct order.

Check you reference first jQuery, then the Color plugin:

<script src="http://code.jquery.com/jquery-1.6.1.min.js"></script>
<script src="jquery.color.min.js"></script>

Verify the path to both scripts is correct.

Sign up to request clarification or add additional context in comments.

1 Comment

Since I couldn't find the min version in the repositories I downloaded some random one from a random source. There was the problem. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.