I’ve been known to spoil a few things in the past on Twitter and here on the blog. Sometimes my excitement prevents me from using better judgement. To try and counter that, at least here on the blog, I’ve created a simple spoiler tag.
On the site, the spoiler tag will simply black out the text in question. Should you want to read the spoiler, all you have to do is put your mouse on the text and all will be revealed. Check it out:
You’re reading this text and all is really cool but all of a sudden I decided to drop some really revealing information that you weren’t expecting. Now, thanks to the spoiler tag, you don’t have to see if you don’t want to.
Should you want to implement this on your own site, all you have to do is add the following CSS to your style.css template file:
.spoiler { background: #000; color: #000; }
.spoiler:hover { background: inherit; color: inherit; }
Then, the next time you decide to write something that could contain potentially spoilerific details, just wrap the text in a spoiler span:
<span class="spoiler">Juicy information goes here.</span>
I’m sure there are other things you could use this for, like making your blog posts look like something released under the Freedom of Information Act, but I’ll leave that up to you.
1/6/09
rieljun
thanks for your post dude…
keep it up…
to rieljun