Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

new window


Hover Icon Plugin

What does this plugin do? Originally, I created it as a means of adding a hovering icon over links, but the target can be about any element. You can also use clever jQuery selectors to show icons on specific kinds of links, like pdf links, like this:

$('a[href$=.pdf]').hoverIcon({icon : '/images/icons/pdf.gif'});

You could also target any link that’s external (assuming it starts with “http”):

$('a[href^=http]').hoverIcon({icon : '/images/icons/external.gif'});

jQuery newWin Plugin

jQuery newWin Plugin

$.newWin() takes a set of links (usually the entire document's worth) and if they are external it sets them to open in a new window. This way you can avoid having to use the target="_blank" attribute if you want your XHTML to be valid. Links in the same domain are left alone, as well as non-HTTP links.

Example to filter all links in the document:

$(document).ready(function(){
    $('a').newWin();
});

Example just for links inside a certain element:

$(document).ready(function(){
    $('#sidebar a').newWin();
});

Companion Wordpress plugin is attached under the 1.0.1 release. Thank you to http://www.theflow.cc/.