Feedback

type to search

Feature request: Open links in external window

Asked by [ Editor ]

Would be nice if links that users put in their posts could open in a new window.

Or maybe there is a hack or a config for this?

thanks

or Cancel

2 answers

0

debiprasad from Bhubaneshwar, भारत गणराज्य India

I have wrote a piece of JavaSript code and have aded to a Shapado website. This opens all the external site links in a new tab/browsers. But I am unable to run any JavaScript in the current version of Shapado (4.0.0).

$(document).ready(function() {
$("a:[href^=http]").not("[href^=http://yoursite.url]").attr({ target: "_blank" });
});
NN comments
socialmediator
-

nice thinking! .. I see how you are separating out the native site links with the jQ .not method ..thanks for the help.. too bad about JS !

debiprasad
-

This can be done in JavaScript without using jQuery too. But as older version of Shapado was using jQuery, it was easier to use then. I don’t see jQuery in current version of Shapado. Instead it users Modernizr.

Let me know when and how we can execute custom JavaScript on on a Shapado website. I will come with a good solution.

or Cancel

Your answer

You need to join Shapado to complete this action, click here to do so.