Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Set link to open into a new tab

Natalie Sollock
Contributor
November 25, 2019

How do I set an embedded website link to open into a new tab?

2 answers

0 votes
Jeffry Gamba
Contributor
November 25, 2019

Hi @Natalie Sollock 

Below are the instructions on how you will force the external or internal links to open in a new tab.

How to Force External & Internal Links to Open in New Tab

Yes, it is impossible to do that. Sometimes, we create a page that has a lot of links embedded on it. It is annoying that when you click the link it leaves the current page. Well, there is a solution on that, here's how;

  • Note that most of external links automatically open in a new tab
  • In this case, we are forcing internal links to open in a new tab
  • Add a HTML Macro
  • Paste below source code
<script>
jQuery(document).ready(function() {
jQuery(".wiki-content a").attr("target", "_blank");
});
</script>

Regards,

Jeffry

0 votes
Jeffry Gamba
Contributor
November 25, 2019

Hi @Natalie Sollock 

Below are the instructions on how you will force the external or internal links to open in a new tab.

How to Force External & Internal Links to Open in New Tab

Yes, it is impossible to do that. Sometimes, we create a page that has a lot of links embedded on it. It is annoying that when you click the link it leaves the current page. Well, there is a solution on that, here's how;

  • Note that most of external links automatically open in a new tab
  • In this case, we are forcing internal links to open in a new tab
  • Add a HTML Macro
  • Paste below source code
<script>
jQuery(document).ready(function() {
jQuery(".wiki-content a").attr("target", "_blank");
});
</script>

Regards,

Jeffry

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events