クリック前は次のように表示されます。
ビジネスエリアで [Sales] をクリックすると、ドロップダウン選択ボックスが表示されます。「Sales」をクリックしてそのテキスト領域に変更を加えると、灰色にアニメーション化されます。グレーの行もグレーにアニメーション化されますが、これは問題ありませんが、黒い行はグレーではなく黒にフェードする必要があります。
選択後:
Sales をプロパティに変更したことに注意してください。animate() 関数の後で灰色になり、ストライピングが台無しになりました。
これが私の機能です:
success: function (result) {
if (result) {
//change the verbiage of the ".look" element to the newly-changed value of the ".touch" element
theLook.text(newDes);
//swap out the elements so it looks like a normal table cell again
back_to_look();
//flash the span it's in so the user knows the change was successful
theTd.css('background-color','#59b4d4').animate({ backgroundColor: "#333333" }, 1500);
} else {
//flash the ".touch" element in red but DO NOT flip back to the ".look" element since there was a problem updating the data
var oldColor = theTouch.css('background-color');
theTouch.css('background-color','#ff0000').animate({ backgroundColor: oldColor }, 1500);
元の背景色の設定を確認し、元の色に戻すにはどうすればよいですか? jquery css() メソッドを使用して css をターゲットにする必要がありますか?