Open all external links in a new window
The following line of jQuery will add the relavant
target="_blank" attribute to links on the page. It's best to scope it to a particular class or ID; in this case
.content. The code is adapted from one posted on CSS Tricks but makes use of jQuery's
:not() expression. You can also use the same filter selector in your CSS file to style external links differently.
.on() function also means that there need only be one event handler - on the
.content element instead of on every anchor.
This method is used on the page you're on now. Inspect the code to your heart's content.