Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Have you tried script loading using Modernizr.js?</p> <p>I had a similar issue, where the timing of script loading was causing conflict. I used Modernizr.js, which includes the library yepnope.js by default. Below is an example of some scripts I loaded conditionally. You can include a test clause, or simply load them in the order you prefer, with the guarantee that they will load and execute in the order you wish due to the callback.</p> <p>Here is an example with a conditional clause:</p> <pre><code>Modernizr.load({ test: false, //Or whatever else you'd like. Can be conditional, or not so conditional yep: { 'script1': 'MyJavascriptLibrary1.js' }, nope: { 'script2': 'MyJavascriptLibrary2.js', 'script3': 'MyJavascriptLibrary3.js' }, callback: { 'script1': function (url, result, key) { console.log('MyJavascriptLibrary1.js loaded'); //will not load in this example }, 'script2': function (url, result, key) { console.log('MyJavascriptLibrary2.js loaded first'); }, 'script3': function (url, result, key) { console.log('MyJavascriptLibrary3.js loaded second'); } } }); </code></pre> <p>If triggering false, MyJavascriptLibrary2.js and MyJavascriptLibrary3.js will load in the appropriate order, no matter what elements influence how they would behave normally (file size, connection speed, etc.). In these callbacks, you may fire additional javascript as well, in the order you wish to do so. Example:</p> <pre><code>'script2': function (url, result, key) { alert('anything in here will fire before MyJavascriptLibrary3.js executes'); }, </code></pre> <p>Note this can be done without Modernizr.load({...</p> <p>but using simply yepnope({...</p> <p>For more documentation, check out the <a href="http://yepnopejs.com/" rel="nofollow">yepnope.js API</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload