Just put following code in your javascript file and It will pick all links globally from your website and will open them in a new tab. Don’t forget to replace url with your own website’s url.
$(document).ready(function(){ $('a[href*="website.com"] ').click(function(e) { e.preventDefault(); window.open(this.href, '_blank'); return false; }); });
The post jQuery: How to open specific links in new tab having specific url? appeared first on Ayyaz Zafar | Freelance Web Developer.