Posted By

adrianparr on 01/31/12


Tagged

basic ajax html page script code jquery document ready googleapis


Versions (?)

Who likes this?

9 people have marked this snippet as a favorite

jillella
cabbio540
spee66
ringo380
BrockSamsom
cougarboy21
mabad86
xicehawk
unibox


jQuery Basic Setup


 / Published in: jQuery
 

Basic setup code for jQuery, linking to Google APIs for the jQuery library.

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>Untitled Document</title>
  6.  
  7. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
  8. <script type="text/javascript">
  9. $(document).ready(function() {
  10. //Insert your jQuery code here
  11. });
  12. </script>
  13. </head>
  14.  
  15. <body>
  16. jQuery setup example
  17. </body>
  18. </html>

Report this snippet  

You need to login to post a comment.