WordPress.org

Ready to get started?Download WordPress

Forums

Jquery issue after 2.7.1 upgrade (5 posts)

  1. davispe
    Member
    Posted 5 years ago #

    I've got most issues worked out after upgrading except that I can't get the parts of my site that rely on jquery to work.

    I am using iThemes Icar template that has a feature-image (rotating images) and a sidebar tabber. Both have stopped working.

    Any suggestions?

  2. stvwlf
    Member
    Posted 5 years ago #

    not sure if its related but in most of WordPress you have to use "jQuery" instead of "$" in your routines. If you aren't already doing that, give it a try.

  3. Plucko
    Member
    Posted 5 years ago #

    I'm having the same problem as davispe. Does anyone know how to make plugins that rely on JQuery work?

    Thanks.

  4. codestyling
    Member
    Posted 5 years ago #

    The difference between WP 2.7 and WP 2.8 in terms of jQuery and jQuery UI is the major version upgrade of both libraries. The new one libraries are not backward compatible to stuff written for older versions.

    Especially jQuery UI Tabs has been changed (internal and also in usage).
    This is the usage at WP 2.7 with jQuery UI v1.5.2
    $(”#tabs>ul”).tabs();
    And this is the usage for WP 2.8 with jQuery UI v1.7.1
    $(”#tabs”).tabs();
    The Tabs now expects as selector the hosting div container instead of the ul list the older expects.
    If you need a 2 version safe usage, try something like this:

    //jQuery UI 1.5.2 doesn’t expect tab ID’s at DIV, so we have to apply a hotfix instead
    var needs_jquery_hotfix = (($.ui.version === undefined) || (parseInt($.ui.version.split(’.')[1]) < 7));
    $("#tabs"+(needs_jquery_hotfix ? “>ul” : “”)).tabs();

    This type of internal change in jQuery UI affects also other components so a lot of compatibility work has to be spend by authors of plugins and themes.

  5. MitchLeBlanc
    Member
    Posted 4 years ago #

    I'm sorry, but where exactly do I put the code that is quoted above?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.