• Resolved e dev

    (@efishinsea)


    Normally, WordPress isn’t happy with:

    $(document).ready(function() {

    which can easily be replaced in your theme files with:

    jQuery(document).ready(function($) {

    For whatever reason, many vendor files in the theme functioned quite well before as the first declaration. Once I updated to v2.1, they all suddenly broke and had to be updated. Not a huge deal, but confusing as to why we had no problems for a few years, and this plugin update today exposed this issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author merbmerb

    (@merbmerb)

    Sorry about that, what did you have to change to get them working. BTW I will push out a release to change the .ready

    Plugin Author merbmerb

    (@merbmerb)

    Actually looking at the code I am using

    jQuery(document).ready(function( $ ) {

        bodModal.initModal();

    });

    Thread Starter e dev

    (@efishinsea)

    I made the change shown above **in my theme’s JS Vendor files** to fix this: ( replacing instances of $ with jQuery ).

    My comment was to highlight that before today’s update to v2.1, these were never an issue. So, I don’t think there is anything wrong with your plugin, but something in the change exposed this issue in the theme’s JS files. They worked before, and didn’t after updating from v2 to v2.1. I confirmed this by rolling back to v2.0 and the issues vanished.

    Plugin Author merbmerb

    (@merbmerb)

    Sorry I misread your message. That is strange, before 2.1 I was not using any .ready I was just using an IIFE?(Immediately Invoked Function Expression). Strange how the introduction of jQuery(document).ready(function( $ ) {}); would stop $(document).ready(function() {}); working.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘v2.1 update exposes some JS issues in theme’ is closed to new replies.