画像コンテンツがあるdivがあります。画像をクリックしたときにアニメーションを実装したいのですが、最初のクリックでのみ実行され、画像の次のクリックは効果がありません。問題とは何ですか。どうすれば解決できますか?
$(function () {
$('div.c').bind('mousedown', function () {
var $elem = $(this);
$elem.stop(true)
.css({ "-webkit-animation-name": "xi",
"-webkit-animation-duration": "3s",
"-webkit-animation-timing-function": "ease",
"-webkit-animation-delay": "1s",
})
})})
と
@-webkit-keyframes xi{ 0% {
left: 100px;
}
40% {
left: 150px;
}
60% {
left: 75px;
}
100% {
left: 100px;
}}