Skip to content

Instantly share code, notes, and snippets.

@tungd
Created October 1, 2012 15:50
Show Gist options
  • Save tungd/3812627 to your computer and use it in GitHub Desktop.
Save tungd/3812627 to your computer and use it in GitHub Desktop.
<div class="intro-hapham">
<img class="img-intro" src="<?php echo bloginfo("template_directory"). get_post_meta($post->ID,"thumbnail_big",true) ?>" border="0" alt="<?php the_title() ?>" />
<div class="text-intro">
<h1 class="title-intro"><?php the_title() ?></h1>
<div class="bor-gra" style="width: 930px; margin:0px auto; height: 1px; background: #999999; "></div>
<div class="cont-intro">
<div class="cols">
<?php the_content(" ") ;?>
</div>
</div>
</div>
<script>
$(function() {
var i = 0, j,
$cols = $('.col'),
len = $cols.length;
for (i = 2; i < len; i += 1) {
j = i + 1;
if (j > 3 && ( (j % 3 == 0 ) || ( j == len ) )) {
$([
'<a class="anchor next back" href="javascript:',
'$(\'.cols\').animate({ left: ', ((i - 5) / 3 | 0) * -962, ' })',
'"><?php _e('[:en]Back[:vi]Quay lại') ?></a>'
].join('')).appendTo($cols.get(i));
}
if ((j % 3 == 0) && (j < len)) {
$([
'<a class="anchor next" href="javascript:',
'$(\'.cols\').animate({ left: ', (i + 1) / 3 * -962, ' })',
'"><?php _e('[:en]Read more[:vi]Đọc tiếp') ?></a>'
].join('')).appendTo($cols.get(i));
}
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment