Jquery does not load on localhost [closed]

-1

The code is there, the link to the jquery file is correct, but it is not loading the same

    
asked by anonymous 04.09.2015 / 16:00

2 answers

0

Call it using http or https like this:

<script src="http://code.jquery.com/jquery-1.11.3.min.js"></script><scriptsrc="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>

Or download it locally and reference it locally.

Use these references before the other javascript references.

Source: link

    
04.09.2015 / 16:29
0

When you do not specify the protocol this way: "//dominio.com/code.js" the browser completes with the protocol of your page. If you are in http://localhost/ it will get http , if https://localhost it will complete with https and this sometimes causes some problem.

Another problem is that the main jquery library should always come before its derivatives, for example:

<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="jquery-migrate.js"></script>
<script type="text/javascript" src="jquery-bxslider.js"></script>

This is because the jQuery code needs to be "set" so that other libraries can access it. If it is "set" after the libraries, all the functions of them that use jQuery will fail.

    
04.09.2015 / 16:41