Friday, February 15, 2013

Always having the latest version of jQuery

When you develop your website you'll have to use the latest version of jQuery . So you'll download the latest version from http://jquery.com/ or some other site and add it to your project.

So far so good but what happens when jQuery will release a new version?
You'll re download it and update your site every time?
Perhaps. Or you can add this line to your master page/layout:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
This way you reference the google hosted jquery.js file of the latest version, which is regularly updated.

You can also add the latest jQuery-ui.js file:
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
What about the jQuery-ui.css?You got it!
    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/pepper-grinder/jquery-ui.css" type="text/css" />

Stay updated.

1 comment:

  1. This will include the latest 1.9.x jquery version.. the last 2.x versions that supports windows store apps and is much lighter (but stopped supporting ie7/8) is at another url.. All of those cdn urls can be found here: http://code.jquery.com

    ReplyDelete