SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2010
    Location
    Dearborn MI
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    WordPress and jQuery

    Any suggestions on a tutorial for using jQuery with WordPress. I have read the ones I have found, and still having trouble implementing a script that I get to work in a non-WordPress environment. I think the problem is due to not identifying the element Id correctly.

    I have read both sitepoint books "Wicked WordPress Themes" and "jQuery: Novice to Ninja".

    I am trying to get an auto changing panel slider.
    The page:
    http://www.smallgov.us/smallGovTest.html
    shows an example working in a non-WordPress environment.
    (Be patient to see the auto change start working)

    http://www.smallgov.us/
    shows a WordPress example which the user has to click on the arrows for the slider to change.

  2. #2
    SitePoint Evangelist artcoder's Avatar
    Join Date
    Aug 2005
    Location
    Planet Earth
    Posts
    599
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    When I viewed your page with the problem, the Javascript error console in Firefox shows two errors. One of which is ...

    "jQuery is not defined" in the bb01autoSlip03.js file.

    You have included the bb01autoSlip03.js *ahead* of the rest of the JQuery js files. This is probably what is causing the problem.

    In the non-wordpress page that works, you have include the bb01autoSlip03.js *below* the other included js files. This is why it works.

    The order of the inclusion of the js files are important.

    Try moving the bb01autoSlip03.js to below the other js files in your Wordpress version. That way the jQuery files gets loaded first.

  3. #3
    SitePoint Member
    Join Date
    Aug 2010
    Location
    Dearborn MI
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks I will try your suggestion.


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
  •