July 13, 2014

How to Create Hide or Show Links for Posts on Blogger

You can use add Hide/show posts links to make more posts to fit the page.

How to Create Hide or Show Links for Posts on Blogger : easkme

How to Create Show or Hide Links for Posts on Blogger ?
  • Login to Blogger.com.

  • Go to "Dashboard".

  • Go to "Template".

  • Click on "Edit HTML".

  • Add these lines in css style code of blogger template :

  • .posthidden (display:none)
    .postshown (display:inline)

  • Javascript Add the following code to template between <head> and</head>

<script type="text/Javascript"> 

function expandcollapse (postid) { 

   whichpost = document.getElementById(postid); 
   
   if (whichpost.className=="postshown") { 
      whichpost.className="posthidden"; 
   } 
   else { 
      whichpost.className="postshown"; 
   } 
} 
</script>