javascript - Load JS files in specific order -


I have to load JS files in a rail view. I have in Rails view:

  & lt;% = javascript_include_tag "diagram"%>  

Diagram. JS files need JS files that are needed:

  // requires diagramtool / kinetic // is required Diagramtool / diagramtool0 // is required diagramtool / diagramtool1 / / diagramtool / Diagramtool2 is required  

but they are not loaded in the specified order in the diagram. Js file

Enter image details here

I already have < Code> need_tree has been removed. in the application.js file.

What do I have to do to load JS files in a particular order?

Edit1: Every time I click in the scene I get different results (it seems random):

I really Do not know what is happening here !! Is it difficult to load JS files in Rails? I have read a few things about asset pipeline and I do not consider this as random behavior if I always refresh the page, files always load in order. Any help?

Edit 2: The View Source is like this: Image Details Enter here


Comments