버튼을 가리키면 배경색이 변경되지 않습니다.jQuery의 애니메이션이 작동하지 않습니다.
내 jQuery를 :
<script type="text/javascript" src="/js/jquery.js"></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){
$(".reject").hover(function() {
$(this).animate({background: '#000'}, 1000);
}, function(){
$(this).animate({background: '#333'}, 1000);
});
});
</script>
<style type="text/css">
.reject{padding:10px;font-size:20px;background:#F00;}
</style>
내 HTML :
<button class="reject">Reject</button>
나는 무엇을 놓치고? JSFiddle
당신은 jQuery를 UI를 포함하고 다음 jQuery 코드를 사용해야합니다 :
http://stackoverflow.com/questions/190560/jquery-animate-backgroundcolor –
그래서 당신의 코드를 포맷하십시오 다른 사람들이 그것을 읽고 도와 줄 수 있습니다. –
첫 번째 의견은 대답입니다. – maxedison