UserStuff UserStuff - 5 months ago 20
CSS Question

Order of Bootstrap and CSS files

Please help me to order the jquery and css references in my asp.net mvc project because some of my files aren't running and aren't being loaded.

<script src="~/Scripts/_references.js"></script>
<script src="~/Scripts/CustomJavaScript.js"></script>
<script src="~/Scripts/jquery-1.10.2.intellisense.js"></script>
<script src="~/Scripts/jquery-1.10.2.js"></script>
<script src="~/Scripts/jquery-1.10.2.min.js"></script>
<script src="~/Scripts/jquery-2.2.1.js"></script>
<script src="~/Scripts/jquery-2.2.1.min.js"></script>
<script src="~/Scripts/_references.js"></script>
<script src="~/Scripts/jquery.validate-vsdoc.js"></script>
<script src="~/Scripts/jquery.validate.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
<script src="~/Scripts/bootstrap.js"></script>
<script src="~/Scripts/bootstrap.min.js"></script>
<script src="~/Scripts/modernizr-2.6.2.js"></script>
<script src="~/Scripts/respond.min.js"></script>
<script src="~/Scripts/respond.js"></script>
<script src="~/Scripts/jquery-2.1.1.js"></script>
<script src="~/Scripts/jquery.menu-aim.js"></script> <!-- menu aim -->
<script src="~/Scripts/main.js"></script> <!-- Resource jQuery -->
<script src="~/Scripts/modernizr.js"></script> <!-- Modernizr -->

Answer

You are required to order your files by keeping in mind some points

Attention
you must order your file in that manner that

Key point is:
first put the file above which have jquery-xxx.js then jquery-xxx.min.js and then jquery.validate.min.js and so on
same for the css files such as bootstrap.css then bootstrap.min.css and so on

first: main files comes first
i.e.

<script src="~/Scripts/jquery-1.10.2.min.js"></script>

then its predecessor, on which other files are depending.

<script src="~/Scripts/jquery.validate.min.js"></script>
Comments