Demo: [You must be registered and logged in to see this link.]
Demo Online: [You must be registered and logged in to see this link.]
Demo Online: [You must be registered and logged in to see this link.]
Một số forum thường để nhiều box con trong một box bự, thành ra khi mở box bự để xem các bài cũ thì mấy box con trong đó nó lấn át hết rồi
Thế nên méo làm cái này để rút gọn những khung box có chiều dài hơn 200px, tiết kiệm thời gian "kéo scroll" để nẻ mấy cái box ra
Có một lỗi nhỏ là khi dùng nút tắt box thì cái khung này nó vẫn hiện (Ơ cái *beep*)
Chèn vào cuối Topic_list_box
- Code:
<script>
if ($('#sortfmvi').height()>199){
$('#sortfmvi').after('<div class="showmore">Click để xem thê ẩn đi</div>');
$('.showmore').click(function(){$('#sortfmvi').toggleClass('hideforfun')});
$('.showmore').attr('style','');
$('#sortfmvi').addClass('hideforfun')
}
else {
$('.showmore').attr('style','display:none');
$('#sortfmvi').removeClass('hideforfun')
}
</script>
<style>
.hideforfun {max-height:200px;overflow:hidden}
div.showmore {cursor:pointer;background: #F7DCC5;color: #C4884E;font-weight: bold;padding: 5px 10px;text-align: center;}
.pun tbody.statused span.status {float:left;position:relative}
</style>
Xong ~ ~
[You must be registered and logged in to see this link.]