jQuery errors “x.ready.promise is not a function” and “Modernizr.prefixed is not a function” / jQuery.noConflict

When i use jQuery (1.10.2) with jQuery.noConflict(); My scripts give errors like:
TypeError: $ is not a function for b.e. $(window).load(function(){ or $(document).ready(function() {
When i turn noConflict off i got these errors: “x.ready.promise is not a function” and “Modernizr.prefixed is not a function

The first error i understand? Who can explain the error with noConflict off? And tell me how to fix this.

Read More

I try to add:

    $.Deferred(function( defer ) {
    $( defer.resolve );
    $.ready.promise = defer.promise;
});

As suggest here: http://bugs.jquery.com/ticket/12946

I came across this problem when upgrading a website to WordPress 3.6

Related posts

Leave a Reply

1 comment

  1. replace $ with jQuery if you have small amout of scripts..
    or wrap them in:

        (function ($, window, document) { //code }(jQuery, window, document));
    

    or

        jQuery(document).ready(function() { //code });
    

    or

        (function(window, undefined) {
        'use strict';
        //code
        })(this);