jQueryCheck: function( callback ) {
js_log( 'jQueryCheck::' );
// Skip stuff if $j is already loaded:
- if( _global['$j'] && callback )
+ if( _global['$j'] && callback ){
callback();
+ return ;
+ }
var _this = this;
// Load jQuery
_this.doLoad([
}
}
}
- // Load libs and process them
+ // Load libs and process videos
mvJsLoader.embedVideoCheck( function() {
// Run any queued global events:
mv_video_embed( function() {
});
});
} else {
- // If we already have jQuery, make sure it's loaded into its proper context $j
- // Run any queued global events
mvJsLoader.runQueuedFunctions();
}
}
//js2AddOnloadHook: ensure jQuery and the DOM are ready
function js2AddOnloadHook( func ) {
- //js_log('js2AddOnloadHook::' + func );
+ //js_log('js2AddOnloadHook::' );
// If we have already run the DOM-ready function, just run the function directly:
- if( mvJsLoader.doneReadyEvents ) {
+ if( mvJsLoader.doneReadyEvents ) {
func();
} else {
- mvJsLoader.jQueryCheck( function() {
+ mvJsLoader.jQueryCheck( function() {
mvJsLoader.addLoadEvent( func );
})
}