14
Jan
Simple hello world jQuery script for beginners
jQuery is a JavaScript library or framework. It uses CSS-like selectors(#, >) to select a set of elements. Basic knowledge in JavaScript is required to understand and master jQuery.First of all, you need to have a copy of jQuery library. Click here to download the latest version of jQuery library. It’s free. Copy the downloaded jQuery file (ie, jquery-1.1.4.js) to your application folder. Now we can create a simple application with jQuery. Copy the following lines and paste it in your notepad and save the file in your application folder with an extension .htm or .html.
<html>
<head>
<script type="text/javascript" src="jquery-1.1.4.js">
</script>
<!-- include your downloaded jQuery file here -->
<script>
	jQuery(document).ready(function()
    {
		alert(’Hello World!’);
    }
    );
</script>
</head>
<body>
<h1>jQuery Tutorials</h1>
</body>
</html>

When you browse this file, you will get a ’Hello World’ alert window.

Rajeev Pillai
Posted by on 14 Jan 2009 by Rajeev Pillai in jQuery

Add reply

*