javascript tutorial - [Solved-3 Solutions] jQuery library on Google APIs - javascript - java script - javascript array



Problem:

Is there a link to the “latest” jQuery library on Google APIs ?

Solution 1:

<script src="http://code.jquery.com/jquery-latest.min.js"
        type="text/javascript"></script>

click below button to copy the code. By JavaScript tutorial team

Solution 2:

<script type="text/javascript" src="//www.google.com/jsapi"></script>
<script type="text/javascript">
//<![CDATA[
    google.load("jquery", "1");
    //google.load("jqueryui", "1");
    //google.load("swfobject", "1");
//]]>
</script>
click below button to copy the code. By JavaScript tutorial team
<script type="text/javascript" src="//www.google.com/jsapi"></script>
<script type="text/javascript">
//<![CDATA[
    google.load("jquery", "1");
    //google.load("jqueryui", "1");
    //google.load("swfobject", "1");
//]]>
</script>
click below button to copy the code. By JavaScript tutorial team

For production is to hard code the CDN jQuery version:

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
click below button to copy the code. By JavaScript tutorial team

Solution 3:

jQuery also doesn't allow you to call their latest file over SSL

script type="text/javascript" src="https://code.jquery.com/jquery-latest.min.js"></script>
click below button to copy the code. By JavaScript tutorial team
  • will give you a security error.
  • Google's API will let you call over SSL:
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript">
  google.load("jquery", "1.7");
</script>
click below button to copy the code. By JavaScript tutorial team

Related Searches to javascript tutorial - jQuery library on Google APIs