downloading jquery

there are two versions of jquery available for downloading:

  • development version -this is for testing and development.
  • production version -this is for your live website.(it's minified and compressed.)

jquery versions adding to your website follow two simple steps.

  • go to the download page to grab the latest version available.
  • now put downloaded jquery-1.9.1.js file in a directory of your website(e.g /jquery//)

 now you can include jquery library in your html file as follows:--

 <html>

   <head>
  
        <title>  how you can include jquery library in your html file.  </title>
   
         <script  type="text/javascript"  src="/jquery/jquery-1.9.3.js" >

           </script>

        </head>

     </html>

how include the jquery library in your html5 version file

<html>

      <head>

         <title> how you can include jquery library in your html5 file.   </title>

            <script src="/jquery/jquery-1.9.3.js" >   </script>

          </head>

      </html>

note:-html <script> tag type="text/javascript" attribute is not required in html5.

javascript is the default scripting language in html5 in all modern browsers


using cdn(content delivery network)

if you don't want to download and host jquery yourself,then you can include it from a cdn(content delivery network).

advantages

  • decrease server load.
  • faster content delivery.
  • 100% availability.

to use jquery from google or microsoft, use one of the following:--

 <html> 
     
       <head>

        <script   src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js" >

        </script>

       </head>
</html>
<html>

     <head>

      <script   src="//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.9.1.min.js" >

       </script>

     </head>

  </html>