ddeveloperr
3/25/2015 - 1:34 PM

open-links in-blank using .js

open-links in-blank using .js

function addBlankTargetForLinks () {
  $('a[href^="http"]').each(function(){
		$(this).attr('target', '_blank');
	});
}
 
$(document).bind('DOMNodeInserted', function(event) {
	addBlankTargetForLinks();
});