PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Getting jQuery Working with WordPress

  1. Vin Thomas
    Member

    This is for http://fitfx.com

    Ok, I have started to mess with Gravity Forms on a recent theme for a client. They are using a WordPress theme with several jQuery plugins. I have found that jQuery is queued twice (once as <?php wp_enqueue_script('jquery'); ?> and once from Google). I know this is the root cause of my problems, but I need a little help getting everything playing nicely.

    I'd like to use the bundled version of jQuery that comes with WordPress. But when I delete the Google version, the cycle.lite.js plugin stops working.

    I have read in several places about using "jQuery" instead of "$". Here is the code that's being used for the cycle plugin:

    <script type="text/javascript">
    $(document).ready(function() {
    $('.slideshow').cycle({
    timeout: 10, // milliseconds between slide transitions (0 to disable auto advance)
    speed: 1000, // speed of the transition (any valid fx speed value)
    });

    $('#s3slider').s3Slider({
    timeOut: 6500
    });
    });
    </script>

    Can you tell me what's going wrong here?

    If you need me to email the un/pw for the site let me know.

    Thanks for your help!

    Posted 9 years ago on Thursday February 4, 2010 | Permalink
  2. Vin Thomas
    Member

    FYI: The above code is actually for BOTH the s3 slider and the cylce plugin.

    Posted 9 years ago on Friday February 5, 2010 | Permalink
  3. Are you having a problem with your forms working as a result of these other scripts? I didn't see that you mentioned it.

    And yes, most of the time using "jQuery" instead of "$" in the script will work using the enqueued version of jQuery in WordPress. Have you tried that on this script?

    Posted 9 years ago on Friday February 5, 2010 | Permalink