HTML and CSS Reference
In-Depth Information
I strongly recommend that you learn pure JavaScript before getting too involved in libraries like jQuery. That way
you have a better understanding of what JavaScript itself is responsible for and what the library is doing to help
you out.
jQuery Basics
Before you can use jQuery, you need to download the library and include it in your HTML file. Let's set up another
test file so that you can get familiar with jQuery. Follow these steps:
1. Download the latest version from the jQuery website ( ) . At the time of writing this,
the latest version is 1.8.1
2. Place this file in your javascript-examples folder.
3. Create a new file in your text editor.
4. Save this file as example10-10.html .
5. Add the following code to this file:
<!DOCTYPE html>
<meta charset="utf-8">
<title>jQuery Test Page</title>
<h1>This is a test page</h1>
<section id="text">
<h1>A Text Section</h1>
<p id="firstParagraph" class="paragraph">
This text is within the first paragraph element.
<p class="paragraph">
This text is in the second p element.
<section id="form">
<h1>A Web Form</h1>
<form id="webForm" action="#" method="post">
<label for="name">Name</label>
<input type="text" id="name" name="name">
<label for="email">Email</label>
<input type="email" id="email" name="email">
<button type="submit">Submit</button>
Search WWH ::

Custom Search