hacking the blogger hack, part two

Written on October 23, 2006 – 8:30 am | by rayland |

so now, i will show you how to hack the “How can I make show/hide links for my posts?” hack by blogger..

this is a bit trickier since on every post you make, you have to make sure that you give a unique id..

First of all, add these codes within your area and right after the closing of your style sheet..

<style>
.posthidden {display:none}
.postshown {display:inline}
</style>

<script type=”text/Javascript”>

function expandcollapse (postid) {

whichpost = document.getElementById(postid);

if (whichpost.className==”postshown”) {
whichpost.className=”posthidden”;
}
else {
whichpost.className=”postshown”;
}
}
</script>

Now for each post that you plan on adding the show/hide link to, you have to add this span tags as well as a link tag for the show/hide posts..

<span class=”posthidden” id=”WHATEVER YOU WANT TO CALL THIS POST AND MUST BE UNIQUE”></span>
<a href=”javascript:expandcollapse(’WHATEVER YOU WANT TO CALL THIS POST AND MUST BE UNIQUE’)”>
[+/-] show/hide this post</a>

so lets say that:

Here is the beginning of my post.<span class=”posthidden” id=”example post”>And
here is the rest of it. </span>
<a href=”javascript:expandcollapse(’example post’)”>
[+/-] show/hide this post</a>

for an example, follow this link here

  1. One Response to “hacking the blogger hack, part two”

  2. By Claire on Oct 30, 2006

    Also found this wiki for Blogger/Blogger Beta hacks… good source.

    http://www.editthis.info/bloggerhacks/Main_Page

Post a Comment

*
To prove you're a person (not a spam script), type the answer to the math equation shown in the picture. Click on the picture to hear an audio file of the equation.
Click to hear an audio file of the anti-spam equation

Want to subscribe?

 Subscribe in a reader Or, subscribe via email:
  

Find entries :