Envy

File this under "Now, why didn’t I think of that?".

Seth Green has come up with a great little piece of DOM scripting that enhances print stylesheets. Basically, once the page has loaded, it loops through all the links in a specified part of the page: if the text of the link isn’t the same as the "href" value of the link, it creates a <span> right right after the link with the class "printMe". Meanwhile, the screen stylesheet has the display value for that class set to "none" while the print stylesheet has the display set to "inline". Voila! The printed version of the page shows all the links written out.

Clever bastard.

Saturday, August 7th, 2004 8:58pm

Illustrations

Thanks to the magic of machine tags, you can illustrate this post by tagging a picture on Flickr with:

More information

About this site

Adactio is the online home of , a web developer living and working in Brighton, England.

Customise

If your browser was up to it, you'd be able to
?

This is the plain vanilla look.

Search


Subscribe

RSS is an XML-based format for syndicating website content. I have some feeds that you can subscribe to:

Elsewhere

Adactio Elsewhere has small pieces of me, loosely joined:

You can also find me scattered across these sites:

Bedroll

I had the pleasure of welcoming these people into my home:

Buy my book

Bulletproof Ajax