SitePoint Sponsor

User Tag List

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

    jQuery in WordPress issue

    Hi,

    I am having an issue getting the down arrow to scroll down the page smoothly using jQuery on this Wordpress page:

    http://www.infinitybeachhouse.com.au/build/

    The scrollto script is an external JS file which I have placed in the "javascripts" folder, and have referenced it in header.php using an absolute URL.

    I assume jQuery is already loaded by WordPress, so what do I need to do next?

    There is a reference error on the "scrollto.js" in Firebug which says it can't find jQuery.

    Any hep greatly appreciated!

    Cheers
    Jed

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,097
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    You need to have your link to the scrollto script below the link to the jQuery library. At the moment, it's above the jQuery link. The browser reads links from top down, so when it's reading the scrollto file, it gets confused by the references to the library, because it hasn't seen it yet.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2012
    Location
    Adelaide, Australia
    Posts
    32
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Awesome! I've put the scrollto script in the footer and it works perfectly!

    Thanks!


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
  •