Friday, June 30, 2006

Auto Expand Permanent Posts

If u have followed my javascript code for implementing an expand all, contract all feature on your blog then u may want to add this small piece of javascript that will auto-expand a post whenever a visitor clicks the permanent link on one of your posts.
Just add this code somewhere near the bottom of your blog template:

<script type="text/Javascript">
var pageURL = location.href;
if ( (pageURL.indexOf(".html")!=-1) && ( pageURL.indexOf("archive")==-1) ) {

No comments: