Sale is live! Enjoy 70% Off! Use Credit/Debit Cards in India and PayPal outside of India for better experience!

Test if links are external with jQuery


Source Code:

<script>
	$(document).ready(function(){
		var base_url = location.protocol + "//" + location.host;
		$("a").not(":contains(" + base_url + ")").click(function(){
			this.target = "_blank";
		});
	});
</script>

Reviews and Comments