I want the top banner to disappear if you press X

Asked 2 years ago, Updated 2 years ago, 47 views

 <!-- Band banner -->
    <div class="promotionBanner">
        <a href="/refer_a_friend.html" class="bannerLink">  
            <img src="/web/upload/category/editor/2021/03/11/dc454e2d910b096ead46e4ae7f030705.png" alt="Please write down your banner contents." /><-- Change to the desired banner image -->
        </a>
        <a href="class="btnClose"><img src="http://sdsupport.cafe24.com/img/guide/tip/btn_close.png" alt="Banner Close" /></a>
    </div>
    <!--// Band Banner -->
/* band banner js */
var bannerFunc = function(){
    $('.promotionBanner .btnClose').bind("click", function(){
        $('.promotionBanner').hide();
    });
};
$(function($){
    bannerFunc();
});

I coded it as above, but I want to keep it in a state where the band banner shown in the picture below is refreshed when I press X or go to another page.

html javascript jquery

2022-09-20 17:31

1 Answers

If you do this, you will get what you want.
If you study cookies, you can see why.


2022-09-20 17:31

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.