Cái code đó méo làm từ hồi nảo hồi nào méo mới tập tành jq :v Thôi thì dùng cái này thay thế đi :3 (tự nhiên thấy lười sửa code quá =)))
Chèn vào Overall_footer_end:
- Code:
<div class="notice-wrap">
<div class="notice-options">
<div class="notice-hide"></div>
<div class="notice-show" style="display:none"></div>
<div class="notice-del"></div>
</div>
<div class="notice-info">Úm xi la bùm, ba la bùm, ba là ba lá ba là ê ế ê ề bum, ba là ê, a cá ba la ề úm xi là bùm, ba là bum, ba cá ba la ê ế ê ề bum, ba là ê, a cá ba la ề ề ề...</div>
</div>
<script>
$('.notice-hide').click(function(){
$('.notice-wrap').addClass('notice-down');
$(this).hide();
$('.notice-show').show();
my_setcookie("hidden", "ok", false);
});
$('.notice-show').click(function(){
$('.notice-wrap').removeClass('notice-down');
$(this).hide();
$('.notice-hide').show();
my_setcookie("hidden", "nahhh", false);
});
$('.notice-del').click(function(){
$('.notice-wrap').hide();
my_setcookie("hide", "ok", false);
});
if (my_getcookie("hidden") == "ok") {
$('.notice-wrap').addClass('notice-down');
$('.notice-hide').hide();
$('.notice-show').show();}
if (my_getcookie("hidden") == "nahhh") {
$('.notice-wrap').removeClass('notice-down');
$('.notice-show').hide();
$('.notice-hide').show();
}
if (my_getcookie("hide") == "ok") {
$('.notice-wrap').hide();
}
</script>
Và tất nhiên là kiểu gì cũng phải có css
- Code:
/* Notice style by NCat*/
.notice-wrap{padding:10px;position:fixed;bottom:0;right:10px;background:rgba(0,0,0,.7);color:#fff;font-weight:bold;width:250px;height:100px;transition:all 0.2s ease}
.notice-options{float:right;border-bottom:2px solid #fff;padding:7px 2px 5px;margin-top:-50px;border-radius:2px;background:rgba(0,0,0,.5)}
.notice-info{overflow-x:hidden;overflow-y:auto;height:100px;width:250px}
.notice-options div{width:24px;height:24px;display:inline-block;margin:0 5px;background-color:rgba(0,0,0,.7);padding:2px;background-size:24px 24px;border-radius:3px;cursor:pointer}
.notice-hide{display:none;background:url(http://www.iconsdb.com/icons/preview/white/arrow-204-m.png) no-repeat center}
.notice-del{background:url(http://www.iconsdb.com/icons/preview/white/x-mark-m.png) no-repeat center}
.notice-down{bottom:-120px}
.notice-show{display:none;background:url(http://www.iconsdb.com/icons/preview/white/arrow-142-m.png) no-repeat center}