Wednesday, June 26, 2013

How to break a blogger post into multiple pages

Blogger tool does support a "jump break', or a "read more" link, however, it only allows 1 of them.   What happens if you want to write about a 10 page story.     I developed the following code using basic HTML <div> elements with the show or hide attribute, and also added JQuery for some special affects.:

Here is example website with the behavior:

Here is the example HTML code (paste directly into your post).      I created a tool called Blogger PageBreak if you would like to use it.

============  Here is the code (directly from post) =========


<div class="blogtop_171">
<div class="content_1_171">
&nbsp; <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9WPuZ2WjLd7em7JU89XgzZW1ONA51CYXbZ_2zK5uYUGAzpupq8UUsug002eU6yy3BQtE88d1sHpLr0oChqSihXFyzbvEO_cnx5HnQMqIPxGlsV2DnJMTtLA9gWNBn9jGFNxswJ0Cagkcu/s1600/RW+-+LeBron.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh9WPuZ2WjLd7em7JU89XgzZW1ONA51CYXbZ_2zK5uYUGAzpupq8UUsug002eU6yy3BQtE88d1sHpLr0oChqSihXFyzbvEO_cnx5HnQMqIPxGlsV2DnJMTtLA9gWNBn9jGFNxswJ0Cagkcu/s320/RW+-+LeBron.jpg" width="240" /></a></div>
&nbsp; &nbsp;Hate LeBron James.<br />
&nbsp; &nbsp;In fact, I'll never forgive him for mocking Dirk Nowitzki's flu cough in the 2011 NBA Finals. But these days, in the wake of Miami's Finals' triumph over the Spurs, I can't deny how damn good of a basketball player he's become.<br />
&nbsp; &nbsp;Last week he accomplished being only the third player in NBA history to win MVPs of both regular season and The Finals in back-to-back seasons. The other two? Bill Russell and Michael Jordan. Yeah, wow.<br />
&nbsp; &nbsp;Facing elimination in Games 6 and 7 against San Antonio James produced two epic performances totaling 69 points, 23 rebounds and 14 assists.<br />
&nbsp; &nbsp;Like him or not, you can't deny that greatness.<br />
&nbsp; &nbsp;Stubborn as I am, I can no longer keep LeBron off my list of the NBA's greatest all-time players, an elite collection that doesn't include the winningest player (Bill Russell), most dominant physical specimen (Wilt Chamberlain) or 2nd all-time leading scorer (Karl Malone). I can only take solace that LeBron's 11-1 in playoff series as a member of the Heat.<br />
&nbsp; &nbsp;And all us Mavs' fans gleefully know who gave him the one defeat. Right?<br />
&nbsp; &nbsp;My Top 10 Players in NBA History ...<br />
<br />
<div style="font-weight: bold;">
Pages: &nbsp;&nbsp; 1 &nbsp;&nbsp; <a href="#" class="button_2_171">&nbsp;&nbsp; 2 &nbsp;&nbsp; </a><a href="#" class="button_3_171">&nbsp;&nbsp; 3 &nbsp;&nbsp; </a></div>
<hr />
</div>
<!--Tom Page Break: 1 -->
<div class="content_2_171" style="display: none;">
<small><i>(continued from page 1)</i></small><br /><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaEFDwzdfYdF8NkDayTULyxh14BQO_Sd_GrgPlnU81EIIKwuP9rpJYR0OBEuQAPZqVDSzXSIzrYNtmb5WgYtKjXrqDRES_PhdrfB71GVTJ_0B6K1rauLr6F88WP0tPoUk6RRVBynQoQ1bT/s1600/RW+-+Iverson.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaEFDwzdfYdF8NkDayTULyxh14BQO_Sd_GrgPlnU81EIIKwuP9rpJYR0OBEuQAPZqVDSzXSIzrYNtmb5WgYtKjXrqDRES_PhdrfB71GVTJ_0B6K1rauLr6F88WP0tPoUk6RRVBynQoQ1bT/s320/RW+-+Iverson.jpg" width="233" /></a></div>
&nbsp; &nbsp;<b>10. Allen Iverson -</b> Pound-for-pound he's the best player ever. I've stood next to him during an interview. Dude is about 1-inch taller and 10 pounds lighter than me. Stand next to the behemoth LeBron and you'll realize how daunting The Answer's task was. Four-time scoring champ, three-time steals leader and '01 MVP was amazing.<br />
&nbsp; &nbsp;<b>9. Shaquille O'Neal - </b>More powerful than polished, he bulled his way to four championships and 15 All-Star teams. Guys like Hakeem Olajuwon were more talented, but not more accomplished. Or dominant.<br />
<b>&nbsp; &nbsp;8.&nbsp;</b><b>Tim Duncan -</b> The Big Boring white-breaded us to death via four championships, two MVPs and 13 straight seasons on the All-Defensive Team. Also set an unofficial record for whines after foul calls.<br />
&nbsp; &nbsp;<b>7. Oscar Robertson -</b> Yeah, I know he's only got the one ring and just one MVP, but in 1961 the combo guard - get this - averaged a triple-double to the tune of 30.8 points, 12.5 rebounds and 11.8 assists.<br />
&nbsp; &nbsp;<b>6.&nbsp;</b><b>LeBron James -</b>&nbsp;With a consistent shooting touch out to 3-point land added to his brute force finishing around the rim, he's muting critics with two championships, two Finals MVPs and four MVPs. Scary thing? He's still only 28.<br />
<br />
<div style="font-weight: bold;">
Pages: <a href="#" class="button_1_171">&nbsp;&nbsp; 1 &nbsp;&nbsp; </a>&nbsp;&nbsp; 2 &nbsp;&nbsp; <a href="#" class="button_3_171">&nbsp;&nbsp; 3 &nbsp;&nbsp; </a></div>
<hr />
</div>
<!--Tom Page Break: 2 -->
<div class="content_3_171" style="display: none;">
<small><i>(continued from page 2)</i></small><br /><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBTuePa3-IU8G5WiqdHqVTPZ1gaIxHDmqk7EY3UkDFsmvdmyIlawkzcklZ_u3bB4SImxKNrF1aTqS871QgCY7CIa53XviaZDS_1yrsOyfnOFpABaRHWH7OOAZqunEi37KaWoF3NI3ogmIo/s1600/RW+-+Jordan.jpg" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBTuePa3-IU8G5WiqdHqVTPZ1gaIxHDmqk7EY3UkDFsmvdmyIlawkzcklZ_u3bB4SImxKNrF1aTqS871QgCY7CIa53XviaZDS_1yrsOyfnOFpABaRHWH7OOAZqunEi37KaWoF3NI3ogmIo/s320/RW+-+Jordan.jpg" width="265" /></a></div>
&nbsp; &nbsp;<b>5. Larry Bird -</b> Simply the most-competitive, best-shooting player to ever bounce a basketball. His three titles and three MVPs don't begin to tell his fiery story.<br />
&nbsp; &nbsp;<b>4.&nbsp;</b><b>Kobe Bryant -</b>&nbsp;His drama is loathed, but his play can't be anything but loved. Five championships, two Finals MVPs, two scoring titles and nine All-Defensive teams just can't be dismissed.<br />
<div>
&nbsp; &nbsp;<b>3.&nbsp;</b><b>Kareem Abdul-Jabbar -</b>&nbsp;Six titles. Six MVPs. But most importantly, a record 38,387 points behind the most lethal, unstoppable shot in NBA history: The Sky Hook.</div>
<div>
&nbsp; &nbsp;<b>2. Magic Johnson -</b> Along with five championships and three MVPs, he made the NBA cool and popular with his stylish passing and Showtime smile.</div>
&nbsp; &nbsp;<b>1. Michael Jordan -</b> His Airness introduced the NBA to a game played above the rim and beyond known standards. His legacy includes six championships, five MVPs, 10 scoring titles and countless corporations benefiting from his brand.<br />
<div style="font-weight: bold;">
Pages: <a href="#" class="button_1_171">&nbsp;&nbsp; 1 &nbsp;&nbsp;</a><a href="#" class="button_2_171">&nbsp;&nbsp; 2 &nbsp;&nbsp;</a>&nbsp;&nbsp; 3 &nbsp;&nbsp; </div>
<hr />
</div>
</div>
<!--Tom END k: 3 -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript">
</script>
<script>
jQuery(document).ready(function(){
jQuery('.button_1_171').click(function(){
jQuery('.content_1_171').show('slow');
jQuery('.content_2_171').hide('slow');
jQuery('.content_3_171').hide('slow');
$('html, body').animate({ scrollTop: $('.blogtop_171').offset().top - 35}, 500);
return false;
});
jQuery('.button_2_171').click(function(){
jQuery('.content_1_171').hide('slow');
jQuery('.content_2_171').show('slow');
jQuery('.content_3_171').hide('slow');
$('html, body').animate({ scrollTop: $('.blogtop_171').offset().top - 35}, 500);
return false;
});
jQuery('.button_3_171').click(function(){
jQuery('.content_1_171').hide('slow');
jQuery('.content_2_171').hide('slow');
jQuery('.content_3_171').show('slow');
$('html, body').animate({ scrollTop: $('.blogtop_171').offset().top - 35}, 500);
return false;
});
});
</script>




No comments:

Post a Comment