2
アニメーションでナビゲーション背景色を変更しようとしていますが、動作しません。JQUERY - アニメーションnaviagtion背景色
私は現在、次のコードを得た:上述のように
//NAV
$(document).ready(function(){
$(window).scroll(function() {
if ($(document).scrollTop() > 50) {
$("#posnav").animate({
backgroundColor: "#aa0000"
}, 1000);
} else {
$("#posnav").animate({
backgroundColor: "#transparant"
}, 1000);
}
});
});
色をアニメーション化するには、私のknowlegdeのように[jQuery Color plugin](https://github.com/jquery/jquery-color)または[jQuery UI](https://jqueryui.com/)が必要ですjQueryのコアではサポートされていません – empiric
[jQuery animate backgroundColor]の重複の可能性があります(http://stackoverflow.com/questions/190560/jquery-animate-backgroundcolor) – empiric
タイトルの「ナビゲーション」に入力ミスがあります。 – GillesC