Sunday, February 13, 2011

Open External link with new tab in your blogger

0 comments
This will help you to open your every external link
with new tab.try this.
1. Log in to your blogger account and go to  Design >>  Edit HTML

2. Find this tag By using Ctrl+F          </head>

3. Paste below code before the </head>   tag

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">

$(document).ready(function () {

// ---- External Links ----------------------------------------------------------------------------------------------------

$("a[href*='http://']:not([href*='"+location.hostname+"']),[href*='https://']:not([href*='"+location.hostname+"'])").attr("target","_blank").attr("title","Opens new window").addClass("external");

});
</script>

4. now click preview and click save template. you are done.

Leave a Reply

Related Posts Plugin for WordPress, Blogger...