Pages

22 December 2010

peek-a-boo

Here is a very simple show/hide effect code for you to copy and use. This effect is also known as a spoiler or a peek-a-boo. It uses a small inline Javascript. You can use this code anywhere, be it in the sidebar or in your blog post, as long as you can add this code into it. If you are looking for an expandable post (a.k.a read more) function for you posts, and only want to apply it only occasionally, then this method is just nice.
This code will add a button, clicking it will expand the content, showing the hidden part. See it in action, click the button now,

No comments: