WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] jquery included in WP 2.8 not working (7 posts)

  1. ahlex
    Member
    Posted 5 years ago #

    Apparently, the jquery which is included in WordPress 2.8 differs from the actual version of jquery, even though both have the version no. 1.3.2. You can see it when you compare the file sizes.

    That actually wouldn't be a problem at all, but unfortunately this WordPress version of jquery doesn't work with the script I am using (cross slide). So I tried to replace the version of WordPress with the actual one from jquery.com. My script works now, but some javascript features of WordPress (especially in the admin panel) ain't working anymore.

    Can you tell me a way to fix this problem? For example, through altering the cross slide script or wordpress itself?

  2. Heirem
    Member
    Posted 5 years ago #

    WordPress 2.8 includes a concatenation of scripts and CSS. This puts the quality of these scripts at a higher level than before.

    The temporary solution is to place it in the wp-config.php one of these two values :
    define('CONCATENATE_SCRIPTS', false );
    or
    define('SCRIPT_DEBUG', true);

    I also invite you to read the header of wp-includes\script-loader.php

  3. d-phrag
    Member
    Posted 4 years ago #

    well, since I experienced the same problem, I decided to just replace the jQuery that comes with WordPress with the one that is called on crossSlide sample page, works like a charm. Plus this doesn't mess with the rest of the functionality (at least for me) of WordPress.

  4. Adam Harley
    Member
    Posted 4 years ago #

    WordPress uses a version of the jQuery library without the $( alias in order to avoid conflicts. You have to change any calls using $( to jQuery( and they work.

  5. ahlex
    Member
    Posted 4 years ago #

    Thanks a lot Kawauso. I did actually overwrite the jquery file of wordpress so that my script worked. But unfortunately many of the js wordpress functions didn't work then.

    I'm glad I've found your reply now a few months later, so I could finally get everything working.

    So for everyone who's using cross-slide with wordpress: replacing "$(" with "jQuery(" works fine!

  6. nims
    Member
    Posted 4 years ago #

    not working for me on 2.9.1 tried replacing "$" with JQuery.
    Can some pls paste the exact code that needs to go in the header.

  7. johnrhopkins
    Member
    Posted 4 years ago #

    @nims: I'm not sure if this is your issue, but you said that you replaced the $ with JQuery. It is case sensitive and you have to use jQuery. The "j" is lowercase. I just a moment ago replaced my jQuery with JQuery and it did break it.

Topic Closed

This topic has been closed to new replies.

About this Topic