I'm trying to animate a div's background color. I've downloaded jquery.color.js from here - http://plugins.jquery.com/project/color but it didn't work. I deleted the content of jquery.color.js, copy/pasted it from here - jQuery animate backgroundColor and saved it. Still nothing happens.
Here's the code:
<link href="@Url.Content("/Content/Site.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("/Scripts/jquery-1.6.1.js")" type="text/javascript"></script>
<script src="@Url.Content("/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
<script src="/Scripts/jquery-1.5.1.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery.unobtrusive-ajax.min.js" type="text/javascript"></script>
<script src="/Scripts/jquery.color.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#firstDiv').animate({ backgroundColor: '#ff9f5f' }, 2000);
});
</script>
I've tried src="@Url.Content("/Scripts/jquery.color.js")" instead of src="/Scripts/jquery.color.js", but then I get runtime error: 'jQuery' is undefined. I have no idea why it doesn't work.