www.pickatutorial.com Computer Tutorials
Top eBooks: C/C++ | C# | Android | Mathematics | Database | Cloud | Graphics | Networking | Oracle | Hardware | AI
Top Tutorials: C/C++ | C#.NET | PHP MySQL | Java | Java Script | jQuery | HTML | xHTML | HTML5 | VB Script| CSS
Lessons First jQuery Code Bookmark and Share
Tutorial Home
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Lesson 7
Lesson 8
Lesson 9
Lesson 10
Lesson 11
Lesson 12
Lesson 13
Lesson 14
Lesson 15
Lesson 16
Lesson 17
Lesson 18
Lesson 19
Lesson 20
Lesson 21
Lesson 22
Lesson 23
Lesson 24
Lesson 25
Lesson 26
Lesson 27
In the previous lesson we learned the ways we can add jQuery to our web pages. In this lesson we will learn to code our first jQuery web page.

You may have know that almost every programming tutorial and / or programming book starts with a program that prints Hello World! Then why we should take a different route. The code for our Hello World! program follows:

<html>
<head>
<title>First jQuery Page</title>
<script src="jquery-1.9.1.js"></script>
</head>
<body>
<div id = "hello" ></div>
<script type = "text/javascript" >
$ ( "#hello" ). text ( "Hello world!" );
</script>
</body>
</html>


In the above code we have a <div> tag with the id "hello". In the JavaScript code, above, we use the $ sign to access jQuery to select the div element having the id "hello". We set our div tag's text to "Hello, world!".

Please do not worry if the above code is difficult to digest at this point. Hopefully by the end of this tutorial you will be at ease understanding the above stuff.
Next >>> Lesson No. 4: jQuery Ready Event





Home - Advertise - Contact - Disclaimer - About Us
© Since 2006 pickatutorial.com -- All Rights Reserved.