Current status of the Ning Platform is always available on the Ning Status Blog.

NC for Hire

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

 

 

 

You need to be a member of Ning Creators Social Network to add comments!

Join Ning Creators Social Network

Votes: 0
Email me when people reply –

Replies

  • NC for Hire

    Will Also work for Ning 3.0 for external links!

  • NC for Hire

    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:

    <script type="text/javascript">
     x$('a').each(function() {  
      var a = new RegExp('/' + [removed].host + '/');  
      if(!a.test(this.href)) {  
        x$(this).click(function(event) {  
          event.preventDefault();  
          event.stopPropagation();  
          window.open(this.href, '_blank');  
        });  
     }  
    });
    </script>

    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"

      • NC for Hire

        Hey TJ..  nice man.. glad youlike it.. you deserve the shout out!  thanks for all the tips over the years...

This reply was deleted.
 

Some interesting articles related to community management, digital marketing etc. could be found in our digest. Don't hesitate to leave a feedback so we would know that we should continue :-)

Latest Activity

Alina Langley replied to Suzie Nielsen's discussion
Ning 2.0 For Sale
"Do you atill have a NING 2.0 site? I am looking for one, please DM me :)"
Saturday
Alina Langley updated their profile photo
Saturday
Alina Langley updated their profile
Saturday
LEO Mobile App Builder updated their profile
Mar 26
Aase Lillian replied to Aase Lillian's discussion
Community - activity page
"Ok, thank you. Please send me details as I have no idea on how to do it. "
Mar 19
Aase Lillian and ⚡JFarrow⌁ are now friends
NC for Hire
Mar 19
⚡JFarrow⌁ updated their profile photo
Mar 18
⚡JFarrow⌁ replied to Aase Lillian's discussion
Community - activity page
"Yes you can add emojis to your community pretty much anywhere you like.
If you need some help…"
Mar 18
Aase Lillian updated their profile
Mar 18
Aase Lillian posted a discussion
Hi all. Is it possible to add emojis to the community? I also wish the activity page to include…
Mar 18
Donna MacShoe updated their profile photo
Mar 6
Adul Rodri is now friends with ANGE.L LUAR and Margarida Maria Madruga
Feb 14
More…

Meanwhile, you can check our social media channels