![]() |
External Links in A New window
So here is the Code.
1)Go to the blogger
2)click on template
3)click Edit Html
4)above </head> paste this code
***********
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js' type='text/javascript'></script>
<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>
5) Save your Template And enjoy
0 comments:
Post a Comment
Click to see the code!
To insert emoticon you must added at least one space before the code.