-
Notifications
You must be signed in to change notification settings - Fork 47
Files are being loaded twiceΒ #82
Description
Hi
As I used the library as explained but my files are being loaded twice,
here is the code:
fallback.load({
BSCSS:['https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css',
'assets/css/bootstrap.min.css'],
jQuery: [
'//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js',
'//cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js',
'/assets/js/jquery.min.js'],
BSJS:['https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js',
//'assets/js/bootstrap337/bootstrap.min.js'],
'jQuery.ui': [
'//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js',
'//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js',
'/assets/js/jquery-ui.min.js'],
page_css: ['/subsites/oxtedgasholder/assets/css/main.css?v=1.85'],
'jQuery.validate':['/assets/js/jquery.validate.min.js'],
formValidation:'/assets/js/planningsites/formValidation.js?v=1.85',
sitejs: ['/subsites/oxtedgasholder/assets/js/site.js?v=1.85'],
}, {
// Shim jQuery UI so that it will only load after jQuery has completed!
shim: {
'BSJS': ['jQuery'],
'jQuery.ui': ['jQuery'],
jQuery.validate': ['jQuery'],
'formValidation':['jQuery'],
'sitejs': 'formValidation'
},
callback: function(success, failed) {
// success - object containing all libraries that loaded successfully.
// failed - object containing all libraries that failed to load.
// All of my libraries have finished loading!
// Execute my code that applies to all of my libraries here!
}
});
fallback.ready(['jQuery'], function() {
// jQuery Finished Loading
// Execute my jQuery dependent code here!
});
fallback.ready(function() {
// All of my libraries have finished loading!
// Execute my code that applies to all of my libraries here!
});
HERE is the output copied from browser network tab
Please let me know, if I am doing anything wrong.
Thanks in advance.
Philip