Wanna know how to make all external links on your Ning open in a new window, everytime? We'll here's how you do just that.
Add this to your custom Code box (if you're Ning Plus or Ning Pro)
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery("a[href*='http://']:not([href*='http://yourdomain.com'])").attr("target","_blank");
jQuery("a[href*='https://']:not([href*='https://yourdomain.com'])").attr("target","_blank");
});
</script>
Don't forget to change yourdomain.com with YOURDOMAIN.COM
Replies
Will Also work for Ning 3.0 for external links!
I just wanted to follow up on this old post and let you guys know there is another better way to accomplish opening external links in new window. The jquery code i use now is this:
Try it out by clicking the link inside the Credits section of this page for a demo I have all of this outlined in this post on my Ning Tips blog.
Hi friend,
Nice post on your site, and thanks for the shout out!
Wishing you all the best!
"TJ"
Hey TJ.. nice man.. glad youlike it.. you deserve the shout out! thanks for all the tips over the years...