jQuery No Conflict Wrapper Not Working

I’m getting the dreaded Uncaught TypeError: undefined is not a function error in WordPress. I’m pretty sure that I’ve properly enqueued my jQuery script (it’s showing up properly in the footer), and I’ve used the following no conflict wrapper at the start of my code: jQuery(document).ready(function($) {.

I’ve tried replacing all $ variables with jQuery. I’ve also defined var $j = jQuery; and replaced all $ variables with $j.

Read More

There are other theme-generated jQuery scripts on the page that are working (embedded, not enqueued), so there might be potential conflicts, but I’m not sure how to debug that.

Any help appreciated. I can provide link to the site if that helps.

EDIT

I had this script working perfectly earlier from within the jQuery UI Widgets plugin, but that plugin seemed to be causing serious issues (crashed my site). So I disabled the plugin, and I haven’t been able to get the script working since.

Related posts

Leave a Reply

2 comments

  1. You could try this:

    var j = jQuery.noConflict();
    j(document).ready(function () {
      ...
      //replacing all Dollar Signs with the j
    });
    

    That’s what worked for me