[英]Why isn't my jQuery for changing the background color of my div with animation changing?
准备好文档后,我将得到以下代码:
$(".contact input[type='submit']").click(function() {
$(".contact").animate({"background":"#55bf31"}, 1000);
});
在HTML文档的head
有以下代码:
<script src="http://codeorigin.jquery.com/jquery-1.10.2.min.js"></script>
<script src="http://codeorigin.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
是什么阻止了此代码的触发? 这是为我的背景设置CSS(嗯,SASS)的方式:
.contact {
@include background(linear-gradient(#3e72ab, #39699d));
color: #fff;
display: none;
height: 500px;
用这个:
$(".contact").animate({"backgroundColor":"#55bf31"}, 1000);
要么:
$(".contact").animate({"background-color":"#55bf31"}, 1000);
现场演示: http : //jsfiddle.net/xdytA/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.