
Now since Blogger doesn't support that kind of paging, what we need to do is to create a similar approach by using JQuery scripts and CSS styling.
NOTE: This approach assumes that you are already using JQuery to your template, if not, just add this to the head part of your template ( just before the </head> )
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
Demo
The Code
CSS
You can change the colors and sizes to customize your own pagination<style> .hiddenPage{display:none;} /*do not touch this*/ a.page{padding: 3px; border:1px solid #d3d3d3;text-decoration:none;} a.activePage{color:red;} </style>
HTML
Use this as a layout for your pages.<!--CONTENT--> <div id="page1" class="contentPage"> This page 1 Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </div> <div id="page2" class="contentPage hiddenPage"> This page 2 Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur? </div> <div id="page3" class="contentPage hiddenPage"> This page 3 At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat </div> <!--PAGINATOR--> <a href="#page1" class="page activePage">1</a> <a href="#page2" class="page">2</a> <a href="#page3" class="page">3</a>
JQuery
It would be best to place this on the bottom part of the HTML code<script> function changePage(pageElement){ $(".contentPage").addClass('hiddenPage'); $id = $(pageElement).attr('href'); $($id).removeClass('hiddenPage').show(); $(".page").removeClass('activePage'); $(pageElement).addClass('activePage'); } $('.page').click(function(){changePage(this);}); </script>
How it Works
This approach is also known as Tabbing. What we are doing is we hide the other pages and use the CSS attribute display to toggle it's visibility.The good thing about this approach is that changing of pages takes a faster time since all pages are already loaded and what we are trying to do is just change it's visibility. The downside with this one though is that, since we are trying to load all pages as if it was really visible, the loading speed becomes slower.
How to Use
Place all of these code (CSS, HTML and JQuery) inside your post, as HTML (Edit HTML). Replace the contents inside eachcontentPage
class with what you want to place in your article per page.
interesting.. pero tulad nga ng sinabi ko, medyo hirap ako pagdating sa mga ganitong bagay.. pero don't worry, adre, bookmarked ko na ito kung saka-sakaling kakailanganin ko in the future.. thanks for this post..
ReplyDeletesame here.
ReplyDeletethanks for sharing this, BTT :D
pwede ito... magagamit ko ito.. salamat sa info na ito.. :)
ReplyDeletewelcome.. salamat sa pagdaan dito @csseyah ^_^
ReplyDeleteThanks for the information sir Ajibanda :) Malaking tulong po ito sa mga blogspot :)
ReplyDeleteyou're welcome ^_^
ReplyDelete