アニメーション終了後に文字色を変更したい。
私はこれを試します:
しかし、うまくいきません!:/
var menuState="closed";
$("#MENU").click(function() {
if (menuState=="closed") {
$("#SOUSMENU").animate({height: "300px"}, 1000);
menuState="open";
} else if (menuState=="open"){
$("#SOUSMENU").animate({height: "0px"}, 1000);
menuState="closed";}});
$("#MENU").click(function() {
if (menuState=="open") {
$("h1").css('color','red');
} else if (menuState=="closed"){
$("h1").css('color','black');
menuState="closed"; }
});
あなたの貴重な助けをありがとう!