これはおそらく修正が簡単なものであり、私はいくつかの明白なものを見逃しましたが、それが何であるかを実際に見つけることができません。
backgroundcoverをクリックすると、backgroundcoverの上にdiv songtitle failInが必要ですが、正常に機能しますが、div songtitleをクリックすると、songtitleをfadeOutにします。これが、問題の始まりです。
私はこれを回避するためにいくつかの異なる方法を試しましたが、成功しませんでした。問題は、songtitle divをクリックすると、本来のようにフェードアウトしますが、0.5秒後に再びフェードインし、これを回避できないことです。
$(".backgroundcover").click(function() {
$(".songtitle").fadeIn("fast");
});
$(".songtitle").click(function() {
$(".songtitle").fadeOut("fast");
});
これに変更すると問題なく動作しますが、1回だけなので、divをフェードインできるのは1回だけです。
$(".backgroundcover").click(function() {
$(".songtitle").fadeIn("fast");
});
$(".songtitle").click(function() {
$(".songtitle").fadeOut({opacity : 0}, 400);
});
そしてHTML:
<div class="backgroundcover">
<div class="songtitle"><a href="#">Hejsan testar</a>Destiny's child - Unknown</div>
</div>