You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 2, 2020. It is now read-only.
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
The text was updated successfully, but these errors were encountered:
I've the same problem with many javascript files which are extending jQuery with a style like
(function($) { })(jQuery);
So there is no window.library_alias...
For example bootstrap does this. What is the specifier for bootstrap? I've tried jQuery.scrollspy because this is the first not found function of bootstrap.
But bootstrap.min.js get's loaded from all specified urls.
You need to use a function / class or variable name which is defined when the script or css file was loaded successfully, but isn't defined before.
I'm using bootstrap.bundle.min.js with "jQuery.fn.popover" as selector (instead of "BSJS" as in the thread opener's post). [tested with fallback v1.1.9]
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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'
},
HERE is the output copied from browser network tab
Please let me know, if I am doing anything wrong.
Thanks in advance.
Philip
The text was updated successfully, but these errors were encountered: