New Window

If you have a place where users can post links, such as a forum, you can control which content opens in a new window and which stays in the same window with this simple jQuery

$("div#yourdiv a[href^='http']").attr("target","_blank");

What this will do is look for links in a specified div (in this case with the id yourdiv) and then check to see if they start with http (this allows for https), if it does then it adds the target attribute with the _blank value which means open the link in a new window.