1
<link rel="stylesheet" href="public/rappid.min.css" />
<script src="public/jquery.js"></script>
<script src="public/lodash.js"></script>
<script src="public/backbone.js"></script>
<script src="public/rappid.min.js"></script>
<link rel="stylesheet" type="text/css" href="public/joint.ui.tooltip.min.css" />
<script src="public/joint.ui.tooltip.min.js"></script> 

I want this order for scripts injection, but when i am using scriptinjector, they are loaded randomly and giving error like this.

backbone.js:382 Uncaught TypeError: Cannot read property 'extend' of undefined(…)(anonymous function) @ backbone.js:382(anonymous function) @           
 backbone.js:31(anonymous function) @ backbone.js:34
ConsoleLogger.java:32 backbone.js Loaded
ConsoleLogger.java:32 jquery.js Loaded
joint.layout.treeLayout.min.js:14 Uncaught ReferenceError: joint is not defined(…)(anonymous function) @ joint.layout.treeLayout.min.js:14
ConsoleLogger.java:32 joint.layout.treeLayout.min.js Loaded
callgraph.js:1 Uncaught ReferenceError: joint is not defined(…)(anonymous function) @ callgraph.js:1
ConsoleLogger.java:32 callgraph.js Loaded
rappid.min.css:15 Uncaught SyntaxError: Unexpected token .
ConsoleLogger.java:32 rappid.min.css Loaded
ConsoleLogger.java:32 lodash.js Loaded
rappid.min.js:43 Uncaught TypeError: Cannot set property '$' of undefined(…)(anonymous function) @ rappid.min.js:43(anonymous function) @ rappid.min.js:50
ConsoleLogger.java:32 rappid.min.js Loaded

1 Answer 1

2

You'll have to load/inject the next script from the callback signaling the previous one is ready.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.