By adding a single line of javascript to your site, you can automatically enhance your casual links to look and work better.
It's not fussy, wether the link is internal, external, on a subdomain, an anchor or an email link - it will improve its usefullness. All without much work on the developers part too!
Becomes...
It's not fussy, wether the link is internal, external, on a subdomain, an anchor or an email link - it will improve its usefullness. All without much work on the developers part too!
There are 3 very simple steps to adding DLINK to your site. And you dont have to download a thing!
<script type="text/javascript" src="http://oopstudios.com/dlink/dlink.js"></script>Note: this file will never move - linking to my version means you can rely on me making updates!
<div class="dlink"> your <a href="#">link filled</a> content... </div>
a.internal {color: #D47700;}
a.external {color: #0074D4;}
a.subdomain {color: #D43500;}
a.email {color: #00B235;}And your done
DLINK actually adds most of the colour and graphics to my entire site, but lets have a quick demo anyhow!
I have created a custom navigation below (that won't be modified)
Every link in here is fair play! Cause I've given this whole section the class of "dlink"
It's not fussy, wether the link is internal, external, on a subdomain, an anchor or an email link - it will improve its usefullness. All without much work on the developers part too!
So, here's a list of links for example purposes:
Pretty tasty eh? Get in touch if you want to know more or whatever...
Remember that your source code remains simple (and semantic), and to implement the feature is literally a one-minute-job!
Note: the icons have been chosen to work on any background colour!
Sometimes you need to have individual links ignored, or turn an "invasive" feature off, maybe you're paranoid hotlinking and that's no worries! Read on!
Simply add a class of "no_dlink" to the link and it will be ignored
<a href="#" class="no_dlink">ignore this link</a>
Note: This is really for one-off link exclusion, if you're doing this a lot then you probably need to rethink your code layout. You can email me and I'll happily take a look at your sources!
Each, any or all of these features can be turned off by adding parameters to the src atrribute of the script tag. The parameters are:
This example uses one parameter:
<script type="text/javascript" src="http://oopstudios.com/dlink/dlink.js?notargets"></script>
...and this one uses all three parameters:
<script type="text/javascript" src="http://oopstudios.com/dlink/dlink.js?notargets¬itles&nomailevents"></script>
It doesn't matter what order you have them either. It's nice like that!
To be honest, I'm heartbroken you'd ever think such a thing about me, but clearly you have your reasons, whatever they may be.
There are many advantages to hotlinking the script: laziness, automatic updates (for speed and file associations), saves your bandwidth. The OOPStudios server is an awesome rackspace server and hasn't "gone down" once in 3 years, so that's cool too!
If you're wondering, I would never do anything bad or invasive with this script, my reputation is on the line after all, and I'm rather fond of that!
I've written a non-technical explaination of how DLINK works for the curious.
Also, Ask The CSS Guy has a CSS-only technique, it didn't have the features I wanted (notably favicons), but it might be perfect for you, so check that out too.