link in topic to new tab

Go down

Solved link in topic to new tab

Post by erchima on December 18th 2013, 1:23 pm

how to create a link in the post when clicked will open in a new tab?
I made ​​a link in each topic, then click on it will open in the same tab, and then how to create links in post will open in a new tab?
avatar
erchima
Forumember

Female Posts : 629
Reputation : 15
Language : INDONESIAN | Lua Script | Visual Basic | and Coding
Location : Under your bed xD

http://erchimacute.forumid.net

Back to top Go down

Solved Re: link in topic to new tab

Post by Ange Tuteur on December 18th 2013, 1:35 pm

Hello erchima,

this should change the target attribute for posts :
AP > Modules > Javascript codes management > Create a new script

Name : what you wish
Placement : In the topics
Code:
jQuery(function() { jQuery('.post a').attr('target','_blank'); });

This would make all links in .post open in a new tab.
avatar
Ange Tuteur
Forumaster

Male Posts : 13195
Reputation : 2911
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: link in topic to new tab

Post by erchima on December 18th 2013, 1:56 pm

SethC1995 wrote:Hello erchima,

this should change the target attribute for posts :
AP > Modules > Javascript codes management > Create a new script

Name : what you wish
Placement : In the topics
Code:
jQuery(function() { jQuery('.post a').attr('target','_blank'); });

This would make all links in .post open in a new tab.
thank you very much, work and solved  kiss
avatar
erchima
Forumember

Female Posts : 629
Reputation : 15
Language : INDONESIAN | Lua Script | Visual Basic | and Coding
Location : Under your bed xD

http://erchimacute.forumid.net

Back to top Go down

Solved Re: link in topic to new tab

Post by Ange Tuteur on December 18th 2013, 2:05 pm

You're welcome

Topic solved and archived
avatar
Ange Tuteur
Forumaster

Male Posts : 13195
Reputation : 2911
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum