• Resolved orion1s

    (@orion1s)


    I have found that others had this problem, but I’m not sure what to do about it. I am using FoundationPress as the core theme and not loading any second version of jQuery as far as I can tell. I get this error when clicking a link integrated with Popup-Maker:

    TypeError: f.getClientRects is not a function. (In ‘f.getClientRects()’, ‘f.getClientRects’ is undefined)

    Foundation is loading jQuery v3.2.1

    Is your plugin incompatible with Foundation?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @orion1s – Pretty much all of WordPress is incompatible with that ;).

    WP comes with jQuery v1.12.2, all plugins and themes are built on that version for compatibility. jQuery v3 is not backward compatible with v1 so it simply isn’t gonna work and isn’t a good play until WP core updates theirs to the latest or you are essentially on your own for any functionality that uses javascript like popups, sliders etc.

    Hope that helps.

    Thread Starter orion1s

    (@orion1s)

    Ok, thanks for the quick reply. After some research I found what to change in the enqueue-scripts.php file of FoundationPress:

    // Deregister the jquery version bundled with WordPress.
    wp_deregister_script( ‘jquery’ );

    // CDN hosted jQuery placed in the header, as some plugins require that jQuery is loaded in the header.
    wp_enqueue_script( ‘jquery’, ‘https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js’, array(), ‘3.2.1’, false );

    So I just commented out those lines, the old version of jQuery loads and now your plugin works! I don’t know if anything else is breaking but we’ll see. I checked another site of ours that uses Foundation, but uses the JointsWP theme instead of FoundationPress and it is loading the old version of jQuery, so it seems to be a FoundationPress issue, not Foundation itself.

    I’m not a developer, more of a designer/front end guy, but this situation with jQuery where the new version is broken seems dumb. In my research I came across a thread where the commenters wanted Foundation to stop relying on jQuery, and apparently that will happen with Foundation 7.

    Plugin Author Daniel Iser

    (@danieliser)

    @orion1s – Glad you got it worked out. Probably a good idea for them, if they want to remain relevant in the WordPress space as well as other spaces since WP will stay with v1.12 for the foreseeable future and others, may be using the latest.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘jQuery Conflict’ is closed to new replies.