Goostream - Upload videos share & make money

Blogger Script Opens New Tabs When Your Site Link Is Clicked


 1. OPEN NEW TAB (ALL LINKS - INTERNAL & EXTERNAL)


Save the following code above </head>

<base target='_blank'/>


 The code above makes ALL the links on your blog open new tabs or new windows, including menu navigation, links in the sidebar.


2. OPEN NEW TAB (ONLY EXTERNAL LINKS)

Save the following code above </head>

<script type='text/javascript'>
$(document).ready(function() {
  $("a[href^='http://']"). each(
    function(){
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr('target', '_blank');
}
}
);
$("a[href^='https://']"). each(
function(){
if(this.href.indexOf(location.hostname) == -1) {
$(this).attr('target', '_blank');
}
}
);  
});
</script>


The code above will create only external links (outbound links) that open new tabs, while internal links do not.

Posting Komentar

Lebih baru Lebih lama

Recent Post

Goostream - Upload videos share & make money

Features

Goostream - Upload videos share & make money
Goostream - Upload videos share & make money