以下は、フッター バナーを表示および非表示にするために使用されるコードです。MouseOver 以外はすべて正常に動作しています。
MouseOver は機能しますが (トリガーされると、その領域にハイライトが表示されます)、ユーザーがその領域をクリックすると、ハイライトは消えますが、ユーザーがその領域を出ると、出口をクリックした後、再度トリガーされるとハイライトが点滅します。
したがって、同じ領域をクリックすると、mouseenter/mouseleave コードがリセットされるようです。
クリックした後でも、このイベントのトリガーを再び防ぐにはどうすればよいですか? ありがとうございました。
// Hide the Footer
$(document).on('click','div#fixedPageFooterShown', function() {hideFooterBanner();});
// Highlight Footer MouseOver
$(document).on('mouseenter','div.fixedPageFooterDisplay', function() {
$('img.bannerBottomMouseOver').show();
}).on('mouseleave','div.fixedPageFooterDisplay', function () {
$('img.bannerBottomMouseOver').hide();
});
// Hide Footer Banner Function
function hideFooterBanner() {
$('div#fixedPageFooter').fadeOut('fast', function () {
$('div#fixedPageFooterClosed').fadeIn('fast');
$('img.bannerBottomMouseOver').fadeOut('fast');
$('img#footerArrowMin').hide();
$('img#footerArrowMax').show();
});
}
// Show Footer Banner Function
$(document).on('click','div#fixedPageFooterClosed', function() {
$(this).fadeOut('fast', function () {
$('div#fixedPageFooter').fadeIn('fast');
$('img.bannerBottomMouseOver').fadeOut('fast');
$('img#footerArrowMax').hide();
$('img#footerArrowMin').show();
});
});