SitePoint Sponsor

User Tag List

Results 1 to 16 of 16
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JQuery not loading

    Hi,

    I am working on a site which is working fine locally. I have uploaded it to my staging server and the JQuery doesn't seem to be loading (which is hosted by Google).

    Can anyone please assist to let me know what the issue might be?

    An image slider should appear on this page, but instead the images are just loading one under the other.

    And a JQuery "scroll to" should work for the sub nav on this page, but again it's not working once the site is live.

    Any help would be greatly appreciated!

    Cheers
    Jed

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Thordendal View Post
    An image slider should appear
    Seems to work fine for me.

    Quote Originally Posted by Thordendal View Post
    And a JQuery "scroll to" should work for the sub nav
    I don't even think that I can even see a sub nav on that page.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The about page should have a slider, but all I can see are the images appearing under each other. Screenshot attached.

    Is the slider appearing for you? I've check on two computers, and cleared my cache and it's not working. screenshot.png

    The sub nav is a horizontal list with blue links (in the white area).

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Thordendal View Post
    The sub nav is a horizontal list with blue links (in the white area).
    Oh I get it. The link you provided was incorrect, so I'm just being taken to your home page

    Do you feel like giving us a correct link to the page with the subnav that's having trouble?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,166
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Thordendal View Post
    The about page should have a slider, but all I can see are the images appearing under each other.
    The slider works for me, too, BUT ... it took ages for the page to load fully, during which time the images appeared as you describe. So it seems there's a long delay in the script loading, which needs some attention.

    The sub nav is a horizontal list with blue links (in the white area).
    There doen't appear to be blue links in the second page you linked to (where you said the problem occurs).

    Edit:

    Ah, Paul beat me on that point. Yes, the link is presumably the wrong one.)

  6. #6
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The slider is the "About" page. Strangely, if the page stays loaded, the slider appears after about 20 seconds. Why would this be the case?

    The sub nav should have a smooth "scroll to" and is on the "Gourmet Products" page. And the arrows under each product category should scroll back to top.

    Cheers!

  7. #7
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry about the link being wrong.

    Thanks Ralph, do you have any idea why the script wouldn't load immediately? The link to JQuery is in the header of the HTML.

    And I'm pretty sure it's Jquery, not the slider itself, as that's why the scroll to links (not to mention the lightbox product images) aren't working.

  8. #8
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,696
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Something is forcing the page to wait until it has finished loading. Could it be something like the document.write getting in the way?
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  9. #9
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,166
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    As I mentioned, some of your scripts are taking an eternity to load (over a minute for me). It seems livereload.js is taking a long time in particular. Once the gourmet page finally loads, the scrolling works there, too.

  10. #10
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry, maybe a dumb question, but what is the document.write?

    Is it perhaps something to do with my (pretty ordinary) hosting? Maybe their settings or something?

  11. #11
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Maybe live reload is stuffing it up. It's an application that reloads browsers automatically when changes are made locally.

    I'll try and remove that tonight and see if that fixes it.

    Stay tuned!

    Cheers

  12. #12
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,166
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Thordendal View Post
    Maybe live reload is stuffing it up.
    Yes, as I mentioned above, it is taking an eternity for livereload.js to load. I was using the Chrome Network tab to view the loading times of all the various page files.

  13. #13
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh thanks. I will remove this script and see if that fixes it.

    Thanks for your help so far, let's hope that works.

    Jed

  14. #14
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Ralph and Paul,

    I removed the Live Reload script and all working beautifully.

    Thanks for your assistance!

    Jed

  15. #15
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,166
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Cool. Glad you got it sorted. Thanks for the feedback.

  16. #16
    SitePoint Wizard
    Join Date
    Jul 2003
    Location
    Kent
    Posts
    1,921
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    you've got autoPlay set to false.
    I'd have thought true would be better as users currently have to manually change slides.

    page loads okay incidentally.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •