Open external links in new window

$("#content a[href^='http://']").attr("target","_blank");

1 Response

I would rather prefer adding this one:



Just in case some internal links are not relative to the base document, thinking about WordPress for example...

Write a comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.