Tutorial: Open in new tab

Kali niy nes nk tnjuk mcmmana pla nk wat bila kte click anything in ur blog ia akn open in new tab..
Actually niy akn mnyenangkan ur readers cuz if die npk something yg mnarik at sidebar u'all for example, then when they click so ia akn t'buka as 1 new tab n x kan mgganggu d older tab.. Mana la taw die tga khusyuk bace something at ur blog so if die tkan other link ia xkn ggu ap yg die tgh bce tuw ;))
So, let's start our tuto ^^

1st step:
Then paste this code..
<!-- code for turning all non-blog links to new page links -->
<script type="text/javascript" language="javascript">
var arr = document.getElementsByTagName("a"); //get all links in the page
for(var i = 0; i < arr.length; i++)
if(arr[i].href.indexOf("Your URL") < 0 //not links that are 'inside' blog
&& arr[i].href.indexOf("javascript:") < 0) //not javascript links
arr[i].target = "_blank";
Haa niy je kna wat.. Then PREVIEW la then try wat experiment at ur blog tuw.. If mnjdi, SAVE k n LET ME KNOW hee ;D

0 Comment(s):

Post a Comment

Copyright © 2016 KNISAZIZ. All rights reserved.