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
    Thanks a lot, JFarrow this just may come in handy for something I have in mind.
  • that's a great tip. I use as similar code and works a treat. However, do you think there is a way to "exclude" specific external links? for example, can you force a specific external link to open in the same widow?

     

    thank you!

  • NC for Hire

    @spyro  hmmm   i'll have to think on that one a minute

     

    @Garfield...no problemo homey

    • Thank you ... the _self command is not working.. please let me know if you come up with something.
  • Thank you. This is awesome!
  • Oh my God!  This is cool!  Just installed it on my site and I like it very much!  Ben
  • Great man, thanks a bunch.  Works perfect.

     

    Seth

    www.moviesamongfriends.ning.com

  • AWESOME!  I have been looking for this solution forever....
  • Hey - you know what I just found out that may be an issue for everyone? Every link will pop open a new window, meaning if a user clicks on a Blog post, or Forum post it opens it in a new window. May not be the best user experience though.

    Any possible fix for this maybe? I dunno!
  • thanks so much!!!!!!!!!!
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

Rosas † Negras replied to Rosas † Negras's discussion
After many years of experience, I would like to know from you designers how I can solve this problem and a ridge
"thank you very much I come from the times of this site now I put the photo, it was hard to survive…"
8 hours ago
Bizz replied to Rosas † Negras's discussion
After many years of experience, I would like to know from you designers how I can solve this problem and a ridge
"To do a border without the ridge and using dots you would just write it like this
border:13px…"
9 hours ago
Steve C posted a discussion
 I want to put ads above individual groups.Jen showed me how to put text above forum categories…
13 hours ago
Rosas † Negras replied to George H. Compton IV's discussion
(TIP N3.0 & N2.0) let's hang some Christmas lights..CSS.. Happy holidays :-) updated 12-04-14
"I don't use file manager for photos, so if it's a photo I'm not interested even if after I close…"
18 hours ago
Rosas † Negras replied to Rosas † Negras's discussion
After many years of experience, I would like to know from you designers how I can solve this problem and a ridge
"I agree with you, but I want it rounded, on the square it gives no problem,this is an impossible…"
yesterday
Bizz replied to Rosas † Negras's discussion
After many years of experience, I would like to know from you designers how I can solve this problem and a ridge
"It's because you are using the ridge as a border, to create the ridge the border property adds the…"
yesterday
Rosas † Negras replied to Rosas † Negras's discussion
After many years of experience, I would like to know from you designers how I can solve this problem and a ridge
"I don't want to go below 13 px I know all would be ok but it's too logical"
yesterday
Rosas † Negras replied to Rosas † Negras's discussion
After many years of experience, I would like to know from you designers how I can solve this problem and a ridge
"#xg_masthead /*Top Image*/ {margin: auto;display: block;height:600px;width: auto…"
yesterday
Bizz replied to Rosas † Negras's discussion
After many years of experience, I would like to know from you designers how I can solve this problem and a ridge
" show the css you have used for the border"
yesterday
Rosas † Negras posted a discussion
yesterday
Anam replied to George H. Compton IV's discussion
(TIP N3.0 & N2.0) let's hang some Christmas lights..CSS.. Happy holidays :-) updated 12-04-14
"OH MY GOD!!!! :D :D :D It worked!!!
 
I am so pleased. Thank you Bizz and Rosas for your help. I…"
yesterday
Anam replied to George H. Compton IV's discussion
(TIP N3.0 & N2.0) let's hang some Christmas lights..CSS.. Happy holidays :-) updated 12-04-14
"Thank you Rosas and Bizz.
I am afraid I do not understand these instructions.
I will see if I can…"
yesterday
More…

Meanwhile, you can check our social media channels