Use JQuery to open external links in a new window
I spent some time searching the web for a solution and found a lot of out dated ones or ones that just weren’t what I wanted. Here is an easy to implement snippet for anyone interested:
$("a[href^=http]").each(function(){
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr('target', '_blank');
}
});
This is an updated version of the code found here: http://www.drupalcoder.com/story/80-automatically-open-all-external-links-in-a-new-window-using-jquery. Notice the @ symbol which is now no longer supported in Jquery 1.3.x.
Drupal Week Module Issues
Just posted up a few patches for the Week module. It did exactly what I needed it to, except there were a few things that needed some tweaking.
This is an awesome presentation. It really helps give some perspective on the relationship between design and code when working in on an MVC app.
