2016-07-23 18 views
1

我已經從1到10個文章創建了分頁。但是,當我點擊1或2頁。它沒有像訪問過的頁面或活動頁面那樣得到改變。因此,幫我做...如何在Blogger中使用分頁功能?

下面是CSS代碼:

.post-pagination { 
    margin: 100px auto; 
    text-align: center; 
    width: 100%; 
    float:left; 
} 
.button_1, .button_2, .button_3, .button_4, .button_5, .button_6, .button_7, .button_8, .button_9, .button_10 { 
    border: 2px solid #f4655f; 
    font-weight: 900; 
    padding: 5px 40px; 
    color:#f4655f; 
    transition:ease 0.69s !important; 
} 
.button_1:hover, .button_2:hover, .button_3:hover, .button_4:hover, .button_5:hover, .button_6:hover, .button_7:hover, .button_8:hover, .button_9:hover, .button_10:hover { 
    background: none repeat scroll 0 0 #f4655f; 
    color: #fff; 
    text-decoration: none; 
} 
.post-pagination a { 
    color:#4876ff; 
    float: left; 
    position:relative; 
    left: 7%; 
    list-style:none; 
    margin: 0.5px; 
} 

這裏是jQuery代碼:使用下面

<script style='text/javascript'> 
jQuery(document).ready(function(){ 
jQuery(&#39;.button_1&#39;).click(function(){ 
jQuery(&#39;.content_1&#39;).show(); 
jQuery(&#39;.content_2&#39;).hide(); 
jQuery(&#39;.content_3&#39;).hide(); 
jQuery(&#39;.content_4&#39;).hide(); 
jQuery(&#39;.content_5&#39;).hide(); 
jQuery(&#39;.content_6&#39;).hide(); 
jQuery(&#39;.content_7&#39;).hide(); 
jQuery(&#39;.content_8&#39;).hide(); 
jQuery(&#39;.content_9&#39;).hide(); 
jQuery(&#39;.content_10&#39;).hide(); 
return true; 
}); 

回答

0

問題已解決編碼。我想要更新我的答案。所以,其他用戶可以從中獲益:)

Below - <head> 

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> 


Above: 
    ]]></b:skin> 

<!-- Pagination Script --> 
.post-pagination { 
    margin: 20px auto; 
    text-align: center; 
    width: 100%; 
} 
.post-pagination a { 
    color:#f4655f; 
    float: left; 
    position:relative; 
    left: 7%; 
    list-style:none; 
    margin: 0.5px; 
} 
.button_1, .button_2, .button_3, .button_4, .button_5, .button_6, .button_7, .button_8, .button_9, .button_10 { 
    border: 2px solid #f4655f; 
    font-weight: 900; 
    padding: 5px 40px; 
    color:#f4655f; 
    transition:ease 0.69s !important; 
} 
.button_1:hover, .button_2:hover, .button_3:hover, .button_4:hover, .button_5:hover, .button_6:hover, .button_7:hover, .button_8:hover, .button_9:hover, .button_10:hover { 
    background: none repeat scroll 0 0 #f4655f; 
    color: #fff; 
    text-decoration: none; 
} 
<!-- Pagination Script End Here --> 


Above: </head 

<script type="text/javascript"> 
jQuery(document).ready(function(){ 
jQuery('.button_1').click(function(){ 
jQuery('.content_1').fadeIn('slow'); 
jQuery('.content_2').fadeOut('fast'); 
jQuery('.content_3').fadeOut('fast'); 
jQuery('.content_4').fadeOut('fast'); 
jQuery('.content_5').fadeOut('fast'); 
jQuery('.content_6').fadeOut('fast'); 
jQuery('.content_7').fadeOut('fast'); 
jQuery('.content_8').fadeOut('fast'); 
jQuery('.content_9').fadeOut('fast'); 
jQuery('.content_10').fadeOut('fast'); 
jQuery(this).css('background','#F4655F'); 
jQuery(this).css('color','#fff'); 
jQuery('.button_2').css('background','#fff'); 
jQuery('.button_2').css('color','#F4655F'); 
jQuery('.button_3').css('background','#fff'); 
jQuery('.button_3').css('color','#F4655F'); 
jQuery('.button_4').css('background','#fff'); 
jQuery('.button_4').css('color','#F4655F'); 
jQuery('.button_5').css('background','#fff'); 
jQuery('.button_5').css('color','#F4655F'); 
jQuery('.button_6').css('background','#fff'); 
jQuery('.button_6').css('color','#F4655F'); 
jQuery('.button_7').css('background','#fff'); 
jQuery('.button_7').css('color','#F4655F'); 
jQuery('.button_8').css('background','#fff'); 
jQuery('.button_8').css('color','#F4655F'); 
jQuery('.button_9').css('background','#fff'); 
jQuery('.button_9').css('color','#F4655F'); 
jQuery('.button_10').css('background','#fff'); 
jQuery('.button_10').css('color','#F4655F'); 
return false; 
}); 
jQuery('.button_2').click(function(){ 
jQuery('.content_1').fadeOut('fast'); 
jQuery('.content_2').fadeIn('slow'); 
jQuery('.content_3').fadeOut('fast'); 
jQuery('.content_4').fadeOut('fast'); 
jQuery('.content_5').fadeOut('fast'); 
jQuery('.content_6').fadeOut('fast'); 
jQuery('.content_7').fadeOut('fast'); 
jQuery('.content_8').fadeOut('fast'); 
jQuery('.content_9').fadeOut('fast'); 
jQuery('.content_10').fadeOut('fast'); 
jQuery(this).css('background','#F4655F'); 
jQuery(this).css('color','#fff'); 
jQuery('.button_1').css('background','#fff'); 
jQuery('.button_1').css('color','#F4655F'); 
jQuery('.button_3').css('background','#fff'); 
jQuery('.button_3').css('color','#F4655F'); 
jQuery('.button_4').css('background','#fff'); 
jQuery('.button_4').css('color','#F4655F'); 
jQuery('.button_5').css('background','#fff'); 
jQuery('.button_5').css('color','#F4655F'); 
jQuery('.button_6').css('background','#fff'); 
jQuery('.button_6').css('color','#F4655F'); 
jQuery('.button_7').css('background','#fff'); 
jQuery('.button_7').css('color','#F4655F'); 
jQuery('.button_8').css('background','#fff'); 
jQuery('.button_8').css('color','#F4655F'); 
jQuery('.button_9').css('background','#fff'); 
jQuery('.button_9').css('color','#F4655F'); 
jQuery('.button_10').css('background','#fff'); 
jQuery('.button_10').css('color','#F4655F'); 
return false; 
}); 
jQuery('.button_3').click(function(){ 
jQuery('.content_1').fadeOut('fast'); 
jQuery('.content_2').fadeOut('fast'); 
jQuery('.content_3').fadeIn('slow'); 
jQuery('.content_4').fadeOut('fast'); 
jQuery('.content_5').fadeOut('fast'); 
jQuery('.content_6').fadeOut('fast'); 
jQuery('.content_7').fadeOut('fast'); 
jQuery('.content_8').fadeOut('fast'); 
jQuery('.content_9').fadeOut('fast'); 
jQuery('.content_10').fadeOut('fast'); 
jQuery(this).css('background','#F4655F'); 
jQuery(this).css('color','#fff'); 
jQuery('.button_1').css('background','#fff'); 
jQuery('.button_1').css('color','#F4655F'); 
jQuery('.button_2').css('background','#fff'); 
jQuery('.button_2').css('color','#F4655F'); 
jQuery('.button_4').css('background','#fff'); 
jQuery('.button_4').css('color','#F4655F'); 
jQuery('.button_5').css('background','#fff'); 
jQuery('.button_5').css('color','#F4655F'); 
jQuery('.button_6').css('background','#fff'); 
jQuery('.button_6').css('color','#F4655F'); 
jQuery('.button_7').css('background','#fff'); 
jQuery('.button_7').css('color','#F4655F'); 
jQuery('.button_8').css('background','#fff'); 
jQuery('.button_8').css('color','#F4655F'); 
jQuery('.button_9').css('background','#fff'); 
jQuery('.button_9').css('color','#F4655F'); 
jQuery('.button_10').css('background','#fff'); 
jQuery('.button_10').css('color','#F4655F'); 
return false; 
}); 
jQuery('.button_4').click(function(){ 
jQuery('.content_1').fadeOut('fast'); 
jQuery('.content_2').fadeOut('fast'); 
jQuery('.content_3').fadeOut('fast'); 
jQuery('.content_4').fadeIn('slow'); 
jQuery('.content_5').fadeOut('fast'); 
jQuery('.content_6').fadeOut('fast'); 
jQuery('.content_7').fadeOut('fast'); 
jQuery('.content_8').fadeOut('fast'); 
jQuery('.content_9').fadeOut('fast'); 
jQuery('.content_10').fadeOut('fast'); 
jQuery(this).css('background','#F4655F'); 
jQuery(this).css('color','#fff'); 
jQuery('.button_1').css('background','#fff'); 
jQuery('.button_1').css('color','#F4655F'); 
jQuery('.button_2').css('background','#fff'); 
jQuery('.button_2').css('color','#F4655F'); 
jQuery('.button_3').css('background','#fff'); 
jQuery('.button_3').css('color','#F4655F'); 
jQuery('.button_5').css('background','#fff'); 
jQuery('.button_5').css('color','#F4655F'); 
jQuery('.button_6').css('background','#fff'); 
jQuery('.button_6').css('color','#F4655F'); 
jQuery('.button_7').css('background','#fff'); 
jQuery('.button_7').css('color','#F4655F'); 
jQuery('.button_8').css('background','#fff'); 
jQuery('.button_8').css('color','#F4655F'); 
jQuery('.button_9').css('background','#fff'); 
jQuery('.button_9').css('color','#F4655F'); 
jQuery('.button_10').css('background','#fff'); 
jQuery('.button_10').css('color','#F4655F'); 
return false; 
}); 
jQuery('.button_5').click(function(){ 
jQuery('.content_1').fadeOut('fast'); 
jQuery('.content_2').fadeOut('fast'); 
jQuery('.content_3').fadeOut('fast'); 
jQuery('.content_4').fadeOut('fast'); 
jQuery('.content_5').fadeIn('slow'); 
jQuery('.content_6').fadeOut('fast'); 
jQuery('.content_7').fadeOut('fast'); 
jQuery('.content_8').fadeOut('fast'); 
jQuery('.content_9').fadeOut('fast'); 
jQuery('.content_10').fadeOut('fast'); 
jQuery(this).css('background','#F4655F'); 
jQuery(this).css('color','#fff'); 
jQuery('.button_1').css('background','#fff'); 
jQuery('.button_1').css('color','#F4655F'); 
jQuery('.button_2').css('background','#fff'); 
jQuery('.button_2').css('color','#F4655F'); 
jQuery('.button_3').css('background','#fff'); 
jQuery('.button_3').css('color','#F4655F'); 
jQuery('.button_4').css('background','#fff'); 
jQuery('.button_4').css('color','#F4655F'); 
jQuery('.button_6').css('background','#fff'); 
jQuery('.button_6').css('color','#F4655F'); 
jQuery('.button_7').css('background','#fff'); 
jQuery('.button_7').css('color','#F4655F'); 
jQuery('.button_8').css('background','#fff'); 
jQuery('.button_8').css('color','#F4655F'); 
jQuery('.button_9').css('background','#fff'); 
jQuery('.button_9').css('color','#F4655F'); 
jQuery('.button_10').css('background','#fff'); 
jQuery('.button_10').css('color','#F4655F'); 
return false; 
}); 
jQuery('.button_6').click(function(){ 
jQuery('.content_1').fadeOut('fast'); 
jQuery('.content_2').fadeOut('fast'); 
jQuery('.content_3').fadeOut('fast'); 
jQuery('.content_4').fadeOut('fast'); 
jQuery('.content_5').fadeOut('fast'); 
jQuery('.content_6').fadeIn('slow'); 
jQuery('.content_7').fadeOut('fast'); 
jQuery('.content_8').fadeOut('fast'); 
jQuery('.content_9').fadeOut('fast'); 
jQuery('.content_10').fadeOut('fast'); 
jQuery(this).css('background','#F4655F'); 
jQuery(this).css('color','#fff'); 
jQuery('.button_1').css('background','#fff'); 
jQuery('.button_1').css('color','#F4655F'); 
jQuery('.button_2').css('background','#fff'); 
jQuery('.button_2').css('color','#F4655F'); 
jQuery('.button_3').css('background','#fff'); 
jQuery('.button_3').css('color','#F4655F'); 
jQuery('.button_4').css('background','#fff'); 
jQuery('.button_4').css('color','#F4655F'); 
jQuery('.button_5').css('background','#fff'); 
jQuery('.button_5').css('color','#F4655F'); 
jQuery('.button_7').css('background','#fff'); 
jQuery('.button_7').css('color','#F4655F'); 
jQuery('.button_8').css('background','#fff'); 
jQuery('.button_8').css('color','#F4655F'); 
jQuery('.button_9').css('background','#fff'); 
jQuery('.button_9').css('color','#F4655F'); 
jQuery('.button_10').css('background','#fff'); 
jQuery('.button_10').css('color','#F4655F'); 
return false; 
}); 
jQuery('.button_7').click(function(){ 
jQuery('.content_1').fadeOut('fast'); 
jQuery('.content_2').fadeOut('fast'); 
jQuery('.content_3').fadeOut('fast'); 
jQuery('.content_4').fadeOut('fast'); 
jQuery('.content_5').fadeOut('fast'); 
jQuery('.content_6').fadeOut('fast'); 
jQuery('.content_7').fadeIn('slow'); 
jQuery('.content_8').fadeOut('fast'); 
jQuery('.content_9').fadeOut('fast'); 
jQuery('.content_10').fadeOut('fast'); 
jQuery(this).css('background','#F4655F'); 
jQuery(this).css('color','#fff'); 
jQuery('.button_1').css('background','#fff'); 
jQuery('.button_1').css('color','#F4655F'); 
jQuery('.button_2').css('background','#fff'); 
jQuery('.button_2').css('color','#F4655F'); 
jQuery('.button_3').css('background','#fff'); 
jQuery('.button_3').css('color','#F4655F'); 
jQuery('.button_4').css('background','#fff'); 
jQuery('.button_4').css('color','#F4655F'); 
jQuery('.button_5').css('background','#fff'); 
jQuery('.button_5').css('color','#F4655F'); 
jQuery('.button_6').css('background','#fff'); 
jQuery('.button_6').css('color','#F4655F'); 
jQuery('.button_8').css('background','#fff'); 
jQuery('.button_8').css('color','#F4655F'); 
jQuery('.button_9').css('background','#fff'); 
jQuery('.button_9').css('color','#F4655F'); 
jQuery('.button_10').css('background','#fff'); 
jQuery('.button_10').css('color','#F4655F'); 
return false; 
}); 
jQuery('.button_8').click(function(){ 
jQuery('.content_1').fadeOut('fast'); 
jQuery('.content_2').fadeOut('fast'); 
jQuery('.content_3').fadeOut('fast'); 
jQuery('.content_4').fadeOut('fast'); 
jQuery('.content_5').fadeOut('fast'); 
jQuery('.content_6').fadeOut('fast'); 
jQuery('.content_7').fadeOut('fast'); 
jQuery('.content_8').fadeIn('slow'); 
jQuery('.content_9').fadeOut('fast'); 
jQuery('.content_10').fadeOut('fast'); 
jQuery(this).css('background','#F4655F'); 
jQuery(this).css('color','#fff'); 
jQuery('.button_1').css('background','#fff'); 
jQuery('.button_1').css('color','#F4655F'); 
jQuery('.button_2').css('background','#fff'); 
jQuery('.button_2').css('color','#F4655F'); 
jQuery('.button_3').css('background','#fff'); 
jQuery('.button_3').css('color','#F4655F'); 
jQuery('.button_4').css('background','#fff'); 
jQuery('.button_4').css('color','#F4655F'); 
jQuery('.button_5').css('background','#fff'); 
jQuery('.button_5').css('color','#F4655F'); 
jQuery('.button_6').css('background','#fff'); 
jQuery('.button_6').css('color','#F4655F'); 
jQuery('.button_7').css('background','#fff'); 
jQuery('.button_7').css('color','#F4655F'); 
jQuery('.button_9').css('background','#fff'); 
jQuery('.button_9').css('color','#F4655F'); 
jQuery('.button_10').css('background','#fff'); 
jQuery('.button_10').css('color','#F4655F'); 
return false; 
}); 
jQuery('.button_9').click(function(){ 
jQuery('.content_1').fadeOut('fast'); 
jQuery('.content_2').fadeOut('fast'); 
jQuery('.content_3').fadeOut('fast'); 
jQuery('.content_4').fadeOut('fast'); 
jQuery('.content_5').fadeOut('fast'); 
jQuery('.content_6').fadeOut('fast'); 
jQuery('.content_7').fadeOut('fast'); 
jQuery('.content_8').fadeOut('fast'); 
jQuery('.content_9').fadeIn('slow'); 
jQuery('.content_10').fadeOut('fast'); 
jQuery(this).css('background','#F4655F'); 
jQuery(this).css('color','#fff'); 
jQuery('.button_1').css('background','#fff'); 
jQuery('.button_1').css('color','#F4655F'); 
jQuery('.button_2').css('background','#fff'); 
jQuery('.button_2').css('color','#F4655F'); 
jQuery('.button_3').css('background','#fff'); 
jQuery('.button_3').css('color','#F4655F'); 
jQuery('.button_4').css('background','#fff'); 
jQuery('.button_4').css('color','#F4655F'); 
jQuery('.button_5').css('background','#fff'); 
jQuery('.button_5').css('color','#F4655F'); 
jQuery('.button_6').css('background','#fff'); 
jQuery('.button_6').css('color','#F4655F'); 
jQuery('.button_7').css('background','#fff'); 
jQuery('.button_7').css('color','#F4655F'); 
jQuery('.button_8').css('background','#fff'); 
jQuery('.button_8').css('color','#F4655F'); 
jQuery('.button_10').css('background','#fff'); 
jQuery('.button_10').css('color','#F4655F'); 
return false; 
}); 
jQuery('.button_10').click(function(){ 
jQuery('.content_1').fadeOut('fast'); 
jQuery('.content_2').fadeOut('fast'); 
jQuery('.content_3').fadeOut('fast'); 
jQuery('.content_4').fadeOut('fast'); 
jQuery('.content_5').fadeOut('fast'); 
jQuery('.content_6').fadeOut('fast'); 
jQuery('.content_7').fadeOut('fast'); 
jQuery('.content_8').fadeOut('fast'); 
jQuery('.content_9').fadeOut('fast'); 
jQuery('.content_10').fadeIn('slow'); 
jQuery(this).css('background','#F4655F'); 
jQuery(this).css('color','#fff'); 
jQuery('.button_1').css('background','#fff'); 
jQuery('.button_1').css('color','#F4655F'); 
jQuery('.button_2').css('background','#fff'); 
jQuery('.button_2').css('color','#F4655F'); 
jQuery('.button_3').css('background','#fff'); 
jQuery('.button_3').css('color','#F4655F'); 
jQuery('.button_4').css('background','#fff'); 
jQuery('.button_4').css('color','#F4655F'); 
jQuery('.button_5').css('background','#fff'); 
jQuery('.button_5').css('color','#F4655F'); 
jQuery('.button_6').css('background','#fff'); 
jQuery('.button_6').css('color','#F4655F'); 
jQuery('.button_7').css('background','#fff'); 
jQuery('.button_7').css('color','#F4655F'); 
jQuery('.button_8').css('background','#fff'); 
jQuery('.button_8').css('color','#F4655F'); 
jQuery('.button_9').css('background','#fff'); 
jQuery('.button_9').css('color','#F4655F'); 
return false; 
}); 
}); 
</script>