#1
  1. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    670
    Rep Power
    38

    More than one $(document).ready(function($) {


    Hi, I was wondering if one can use multiple javascripts each beginning with the function:
    Code:
      $(document).ready(function($) {
    Can you only have one of these on a page? I'm importing different scripts and they each have " $document).ready(function($) {" etc. at the beginning.

    Or do I have to put all the code within on script, beginning with" jQuery(document).ready(function($) {"

    thanks
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    Yes you can have more than one.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Mar 2008
    Posts
    670
    Rep Power
    38

    thanks E-Oreo


    thanks so much. There must be an issue with my code then.
    Your info helps a lot!!

IMN logo majestic logo threadwatch logo seochat tools logo