Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 6 of 6
  1. #1
    Banned
    Join Date
    May 2011
    Location
    Fairfax, CA
    Posts
    2,036
    Member #
    28003
    Liked
    126 times
    What am I doing wrong?
    Thanks!
    it's the big "sample" slider on http://phpos.org/

  2.  

  3. #2
    Banned
    Join Date
    May 2011
    Location
    Fairfax, CA
    Posts
    2,036
    Member #
    28003
    Liked
    126 times
    OK do I call my JavaScript in the body after or before the Div in which it is used? Or am I supposed to put it in the head?
    I think that's why my slider is not working right.
    But I really don't know. Please advise!
    Or could it be a CSS problem?

  4. #3
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,715
    Member #
    5580
    Liked
    717 times
    You should put the slider javascripting in the <head> section of your script.
    And you are referencing this file: jquery-1.4.2.js

    But I can't find it .. did you upload that file? You need that file.


  5. #4
    Banned
    Join Date
    May 2011
    Location
    Fairfax, CA
    Posts
    2,036
    Member #
    28003
    Liked
    126 times
    Aha! I simply linked it to http://ajax.microsoft.com/ajax/jQuer...y-1.4.2.min.js instead and now it works Thank you!

  6. #5
    Member
    Join Date
    Nov 2011
    Posts
    50
    Member #
    30017
    Liked
    9 times
    Actually you put the jQuery in the END of the body.

    So like this

    Code:
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript">
     $(document).ready(function(){
      //jQuery in here blah blah blah
    });
    </script>
    Thus, it loads the rest of the site first, making it so that the user can see the site and interact with it, since jQuery isn't generally the main point of the site. And it will load faster with out it in the head.
    m3n0tu18 likes this.

  7. #6
    Banned
    Join Date
    May 2011
    Location
    Fairfax, CA
    Posts
    2,036
    Member #
    28003
    Liked
    126 times
    Heck, it works fine the way it is. Thanks for the advice, though. If it becomes a problem (loading slow) I'll move it.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:34 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com