Why does the page close on the second tap instead of the first tap when using an iPhone? The image changes on tap but doesn't close as expected.
$("#privacy-close-btn").mouseenter(function() {
$("#privacy-close-btn").css("display", "none");
$("#privacy-close-btn-act").css("display", "block");
});
$("#privacy-close-btn-act").mouseout(function() {
$("#privacy-close-btn").css("display", "block");
$("#privacy-close-btn-act").css("display", "none");
});
a img.privacy-close-btn-act {
display: none;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<a href="#" class="close-img">
<img src="assets/img/desktop_privacy_close_inactive.svg" alt="" class="privacy-close-btn" id="privacy-close-btn">
<img src="assets/img/desktop_privacy_close_active.svg" alt="" class="privacy-close-btn-act" id="privacy-close-btn-act">
</a>