Hiding unwanted HTML elements

August 21st, 2007

Why do so many blogs have pictures of the writers on the front page? There’s nothing more distracting than an unfamiliar face staring at you when you’re trying to read. And when what you’re reading is technical or challenging, it just makes things worse. So, I wrote a little script to let you hide any part of a page by clicking on it. Just bookmark this link. Then you can just click the bookmark and click on the offending picture, or whatever, and it goes away.

It sets an onclick event to the document that hides the target, then clears the event. Careful though: if you click on the background the whole page will disappear.

Leave a Reply

Name

Website

Comment