url attrを使用して.click()で画像を切り替えたいのですが、アニメーションが完了して新しいWebページにリダイレクトされるまで、画像を待機させる方法がわかりません。これがjsです
$(function() {
$('.cv').click(function() {
$("#cv img").fadeOut(2000, function() {
$(this).load(function() {
$(this).fadeIn();
});
$(this).attr("src", "images/cv2.png");
return true;
});
});
});
これがhtmlです:
<div id="cv" class="img one-third column">
<a class="cv" target="#" href="cv.joanlascano.com.ar">
<img src="images/cv1.png" alt="Curriculum"/>
<br />CV</a>
</div>