How to order your javascript library

How to order your javascript library
0.0 0


I use jQuery and some other plugins with it also use own script like with .attr and .css. Now my question how to need to be the order for javascript? The first need be jQuery? after that the plugins? And what about same with CSS? first own style after that frameworks? animate.css etc? Is depends? I have own navigation style with jQuery and see that only work in last lines if paste before my own javascript things not work.



If I understand you, it really is a matter of dependencies and what you want to take precedence.

I assume libraries like jQuery come first. Things that depend on something else need to come after that thing. For example, if I remember correctly Bootstrap needs jQuery so jQuery has to come before Bootstrap. After that, I would load my things because I want those to override what I want to overried.