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


Can you delay a certain script?

Hello Creators, I am experimenting with a new feature for my network, however the JavaScripts are conflicting if the page takes too long to load. Is it possible to delay one of my scripts somehow?

Thanks everyone. Take care.

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

Join Ning Creators Network

Email me when people reply –


  • If someone can teach me how to delay a script from loading, I will release an amazing TIP.

    What TIP you ask?

    How about letting your members choose what style sheet they prefer (light/dark/holiday) and have a cookie remember their choice?

    It's possible, I've had it working (not easy) but my problem is that it conflicts with my jquery tabs. So I need to delay the styleswitcher script so that there are not these conflicts.

    Thanks guys, I'd love some help.

  • I'm pretty sure that this is close to the right track....

    Needs a bit of altering, and I need to learn where I am to implement this, and how to apply it to my styleswitcher script.

    onClick="setTimeout(function() {alert('hello');},1250);

    Wouldn't want the alert part, but the timing delay function is there. 1250 milliseconds.

  • So this gives a delayed pop up message. How do I convert this to happen for my styleswitcher script, without the pop up of course.

    <input type="button" value="Push this button to open an alert box in 1250 milliseconds" onClick="setTimeout(function() {alert('hello');},1250);">

  • There's also a small issue with my styleswitcher script. I'll address that if I end up posting the TIP. It's pretty advanced in my opinion.

    Seems that on the first stylesheet, everything is fine, then switch to stylesheet 2, and my ningbar no longer is fixed, and that whole top section is wacky.

    I know you all won't have a clue what I'm talking about, until you see the scripts.

    Perhaps I'll just post the TIP and see what happens.

    • NC for Hire

      Hi Damien ,

      i normally use jQuery to do this :

      This script is to wait the window to complete loading then carry out the javascript


         //javascript code goes here.


      • Awesome Elson, that looks like it would work beautifully, and even looks easy to implement... now can I just delay the call to the script?


        <link rel="stylesheet" type="text/css" href="*iEDVDGj2EDQDxGLzz-tEkbxOz6vD3IHWSSRlM2uLAs-SnptBR7X3LcvpzLGb8dwWNW*d3N/APStyleSheet.css" />


        • That's my stylesheet, I know, but will it work like this?

          • NC for Hire

            Do it like this:


               $('head').append('<link rel="stylesheet" type="text/css" href="*iEDVDGj2EDQDxGLzz-tEkbxOz6vD3IHWSSRlM2uLAs-SnptBR7X3LcvpzLGb8dwWNW*d3N/APStyleSheet.css" />');


            • Ok sorry Elson, this is easier... this is what I need to delay... could you copy and paste, and add the delay for me? I'm failing my attempts.

              <!--trial stylesheet switcher-->
              <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
                  <link rel="stylesheet" type="text/css" href="*iEDVDGj2EDQDxGLzz-tEkbxOz6vD3IHWSSRlM2uLAs-SnptBR7X3LcvpzLGb8dwWNW*d3N/APStyleSheet.css" title="styles1" media="screen" />
                  <link rel="alternate stylesheet" type="text/css"*fJoxnvqgv7/APStyleSheetdark.css" title="styles2" media="screen" />
                  <link rel="alternate stylesheet" type="text/css" href="*TIWgXmeZQdVXrmacxm--bxgjgmBoGhEE76hH4ZbVfclB9ARHpD33o/NewStyleSheet1.css" title="styles3" media="screen" />
                  <script type="text/javascript" src="*pU83VVJlsw*eFlDZ3h3TlV8-BFyIp7pNkB-FthX4a8PnmCJkWwQRGPyeTd1zN0/1059817952.bin"></script>
                  <script type="text/javascript" src="*ooOuaJHf2*UQNNCs83xyTvlMmWkxjBOTb1O5cmE3Qyym171Rw834HlqnQSv2k*tYN9/1059817955.bin"></script>
              <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
              <!-- TemplateBeginEditable name="doctitle" -->
              <!--end trial stylesheet switcher-->

              • Also, you know my fixed ningbar? When I switch to 2nd and 3rd stylesheet, the ningbar is no longer fixed, and all of the stuff in the ningbar is no longer in there. (account module returns to left column, navigation is no longer in ningbar, and ningbar is no longer widened. Seems like the stylesheets don't fully load or something? Not sure if you'll know an answer for this, and I may have to design the 2nd and 3rd stylesheets to not have a fixed ningbar, and think up something different.

This reply was deleted.

Search the Creators Network

Latest Activity

Jords replied to SweetPotato's discussion Tip: Ning 3.0 Slider – Dynamically Loads Blog Posts
5 hours ago
Strumelia replied to Emer Dareloth's discussion Ning 2.0: Adding Two "Groups" Sections?
"Emer, Ning 3.0 can do that, Ning 2.0 cannot.  as a workaround, you could possibly have two text box…"
7 hours ago
Edie2k2 replied to Gerry Emery's discussion I'd like to see an example or two of the new NIng 3.0 websites
"Beautiful site. Bravo Steve!"
8 hours ago
Thiago Santos de Moraes replied to Emer Dareloth's discussion Ning 2.0: Adding Two "Groups" Sections?
"It is not possible."
9 hours ago
The Builder :) replied to Alan's discussion Adding Java Script
"Hi JQueryHelp and Bernard, sorry for taking to answer, I was in a difficult personal situation.

10 hours ago
JFarrow replied to Dominic Lehane's discussion APP Builder
"I've set up a couple of apps using  which allows you to do quite a bit with feeds and even…"
11 hours ago
Ning via Facebook

Designing The Perfect Newcomer To Regular Journey Part 5

JFarrow replied to JFarrow's discussion Community Compass: Reimagining Getting Started Guides for Online Communities-UPDATED
"Just a quick note to let those of you who are using the Community Compass that I have added a new w…"
16 hours ago
SweetPotato replied to SweetPotato's discussion Simple, Responsive Slider for Ning 3.0
"For anyone who is interested in dynamically loading blog posts into this slider (i.e. no manual upd…"
17 hours ago
Mike Collins replied to Gerry Emery's discussion I'd like to see an example or two of the new NIng 3.0 websites
"Here's ours and after migrating just a couple of weeks ago it's great to see it come to life. There…"
18 hours ago
steve replied to Gerry Emery's discussion I'd like to see an example or two of the new NIng 3.0 websites
"Can see i have a long way to go looking at some of these wonderful sites but im happy with it so fa…"
JFarrow replied to JFarrow's discussion How to Map Your Members on a Ning Network
"Because this actually happens outside of the actual network, i don't see how they could, Gerry....…"
JFarrow commented on Gerry Regan's blog post Seeking provider of alternative to Apps.IO's Listings app. in Hire a Creator
"If you're still looking for help with this, I have a few ideas...ill send you my contact info.."
JFarrow left a comment for Natasha Dyer
"Just sent you a message by email...happy to help!"
JFarrow replied to Bernard Lama's discussion Thank you TJ, Jen and other NCs!
"for sure... always inspired by these guys!"
Tyler Durbin replied to Bernard Lama's discussion Thank you TJ, Jen and other NCs!
"TJ has saved my butt a few times!  The guy is a master at what he does and his code always works fl…"
Rowald replied to Rowald's discussion Site host name,, does not match your SSL certificate Subject Name
"Hi Laura, well.. like Amanda said it's expected behavior on their end. Not sure if there is anythin…"
George H. Compton IV replied to Bernard Lama's discussion Thank you TJ, Jen and other NCs!
Katie McKay replied to Bernard Lama's discussion Thank you TJ, Jen and other NCs!
George H. Compton IV replied to soaringeagle's discussion mobile traffic reaches new high and no 3.0 completion date in sight
"Hello seoaringeagle :-)  fullwidth responsive Ning 2.0 network. That's what I'm working on right n…"