Add to Technorati Favorites

Spoilers are snippets of information which you may wish to hide from viewers. For example you are narrating a long tale about a murder and some viewers may wish to cut to the chase and find out who the real murderer is, while others would like to read the whole without having their enjoyment cut short suddenly by the revelation.
This is where you provide hidden text which is revealed with a click. To do this you need to make the following changes :

ADD JAVASCRIPT CODE

Copy and paste this Javascript code between and ]]> tags in your template on the Edit Html subtab of Template tab :



Save Template.

ADD CSS CODE

Then add the CSS code below :

.commenthidden {display:none;}

.commentshown {display:inline;}

just above the ]]> tag in the template and Save Template.

ADD CODE TO POST TEMPLATE

Add the following code to the post template in the Settings----->Formatting tab. Then the code will be available to you whenever you are creating a new post :



expand



PUT HIDDEN TEXT HERE

Give it an unique name where it says NAMEITHERE and change "expand" to what ever you like. Type the hidden text inside the div (thats before the ). Save Settings.
For example :
Nam nunc. Donec blandit porta lacus. To see full text click here --->Nam dui tortor,
mattis vitae, commodo ac, nonummy ac, urna. Nam ut risus eu justo consectetuer convallis. Aenean fringilla. Fusce rhoncus fermentum est. Aliquam et pede non augue vulputate sagittis. Praesent consequat ante at nunc.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Pellentesque lobortis, turpis ut facilisis convallis, nulla sem feugiat tellus, in tempus mauris urna non lacus. Duis pellentesque. Cras tempor iaculis lacus. In pharetra elementum purus.


Thanks to Categories blog for the code.

Add to My AOL Add to Google Reader or Homepage Add to netomat Hub I heart FeedBurner Subscribe in NewsGator Online Subscribe in a reader

0 comments