PDA

View Full Version : BBcode download ẩn hiện trượt dài cho vbb



ShineGhost
12-02-14, 03:19 PM
Replacement


<div class="spoiler-wrap"><div class="spoiler-head folded clickable" align="center"><img src="/forum/tai/down.gif" border="0"></div>
<div class="spoiler-body" align="center">
{param}
</div>
</div>

chèn cuối template headinclude

<script type="text/javascript" src="tai/tai.js"></script>
<script type="text/javascript">
function initSpoilers(context)
{
var context = context || 'body';
$('div.spoiler-head', $(context))
.click(function(){
$(this).toggleClass('unfolded');
$(this).next('div.spoiler-body').slideToggle('fast');
})
;
}

$(document).ready(function(){
initSpoilers('body');
});
</script>
<link rel="stylesheet" type="text/css" href="tai/tai.css" />