JQuery.holdReady (false) - errors on call

I am using yepnope.js to conditionally load css and js files into my page.

I have combined my JS files into one file. The structure looks like this:

/* file */

// - copy pasted Jquery 1.7rc2.min here -

(function () { console.log("enabled hold"); jQuery.holdReady(true); })();

// - copy pasted yepnope.min here -

yepnope([
{
    test: condition,
    load: [css files]
},{
     load:[js files],
     callback: function () {...},
     complete: function () { jQuery.holdReady(false); console.log("hold released");}
}]);

/* end of file */

      

and this is the error i get on the chrome console chrome (version 17.xx)

Uncaught TypeError: Object function ( selector, context ) {
        // The jQuery object is actually just the init constructor 'enhanced'
        return new jQuery.fn.init( selector, context );
    } has no method 'holdReady'
(anonymous function)animatein.js:2
(anonymous function)

      

I read the list of yepnope errors and tried alternative mentodes like having "holdrelease.js" and only jQuery.holdRelease (false); in it and put it as the last item in the queue. I ended up with the same error.

Can someone please explain what is wrong here, I am missing something important? I'm confused...

+3
javascript jquery google-chrome yepnope


source to share


No one has answered this question yet

Check out similar questions:

2812
event.preventDefault () vs. return false
2268
Why is my JavaScript code getting the error "No Access-Control-Allow-Origin header" on the requested resource ", but not Postman?
2201
How do you decide when to use Node.js?
1854
When should you use double or single quotes in JavaScript?
1498
What is the purpose of the var keyword and when should I use it (or omit it)?
1229
When should you use escape instead of encodeURI / encodeURIComponent?
1198
Pure JavaScript jQuery $ .ready () equivalent - how to call a function when the page / DOM is ready for it
1
Pin images from other sites and add them to my site
0
reloading the image inside tinybox
0
the object has no method error using feedback.js



All Articles
Loading...
X
Show
Funny
Dev
Pics