我目前正在尝试在此站点http://theflouringartisans.com/上旋转图像,目标是在展开联系表单时旋转顶部的箭头图像,并在折叠表单时再次旋转。这是我目前拥有的代码:
$(document).ready(function(){
$("#contactbutton").click(function(){
if ($("#contact").is(":hidden")){
$("#contact").slideDown("slow");
$(".arrow").rotateRight(180);
}
else{
$("#contact").slideUp("slow");
$(".arrow").rotateRight(180);
}
});
});
function closeForm(){
$("#thankyou").show("slow");
setTimeout('$("#thankyou").hide();$("#contact").slideDown("slow")', 2000);
}
我还想让 div #thankyou 在提交表单 5 秒后淡出。
非常感谢您的帮助,感谢您抽出宝贵的时间!