Reputation: 35
I am trying to make any link that is not internal show as a popup/new window. The data is user entered and pulled from a database. Any help is appreciated.
Thank you!
Upvotes: 1
Views: 118
Reputation: 16955
Use jquery:
$(function () {
$('a:not([href^="http://www.mysite"])').attr("target", "_new");
});
Upvotes: 1