opens external link jquery by bergb February 04, 2013 JavaScript $('a[href^="http://"]').addClass("external").attr({ target: "_blank" });