I am trying to open a link in a new popup window but the link always open either in same page or in a new tab.
see below my code:
$(document).ready(function() {
$('.link [type="text"]').each(function(e,el){
var link=$(el).val();
var link2=$(el).val();
link2= "link"
$(el).replaceWith($('<a href="' + link + '"return !window.open" target="_new">' + link2 + '</a>'));
});
});