Ads (728x90)

Latest Post

Kesehatan

Tips

By default in templates created with Artisteer the top menu links open in the same window and we can not use when adding our link the target="_blank" option if we want to open the links in a new window or tab. In the next tutorial I will show you how to modify the code in your template , for allowing the links to open in a new window/tab.


1. Log in to your dashboard--> Design- -> Edit HTML 

2. Search "Ctrl+F" and find the following code:

jQuery("ul.art-hmenu").append('<li><a href="'+itemlink+'"><span 
class="l"></span><span class="r"></span><span class="t">'+itemname+'</span>
</a></li>');

Replace the red line with:


<a href="'+itemlink+'" target="_blank">

This will make the links in the navbar open in new windows.

3. To make the links in the sub-menus open in new windows follow the next steps.

For the first sub-menu find:

if (subList1.length == 0 ) subList1 = jQuery("<ul></ul>");
subList1.append('<li>
<a href="'+itemlink+'">'+itemname.substr(1,itemname.length)+'</a></li>');

Replace the red line with:


<a href="'+itemlink+'" target="_blank">

For the second sub-menu find:

if (subList2.length == 0 ) subList2 = jQuery("<ul></ul>");
subList2.append('<li>
<a href="'+itemlink+'">'+itemname.substr(2,itemname.length)+'</a></li>');

Replace the red line with:

<a href="'+itemlink+'" target="_blank">

For the third sub-menu find:

if (subList3.length == 0 ) subList3 = jQuery("<ul></ul>");
subList3.append('<li>
<a href="'+itemlink+'">'+itemname.substr(3,itemname.length)+'</a></li>');

Replace the red line with:

<a href="'+itemlink+'" target="_blank">

4. Save the template. Now all the links in the Top Menu will open in new windows.

DEMO

Post a Comment