Skip to content

Commit fd34057

Browse files
author
Josh Hill
committed
Minor tweaks
Grammar, consistency, whitespace
1 parent 74b5fd4 commit fd34057

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

js/lesson3/tutorial.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Introduction to jQuery
44
---
55

66

7-
So far, we've learned the basic of JavaScript. From variables, to understanding Objects, functions and how to manipulate the ​**D**​ocument ​**O**​bject ​**M**​odel.
7+
So far, we've learned the basics of JavaScript. From variables, to understanding Objects, functions and how to manipulate the ​**D**​ocument ​**O**​bject ​**M**​odel.
88

99
In this session we will introduce jQuery, a very commonly used JavaScript library, that simplifies working with JavaScript.
1010

@@ -18,13 +18,13 @@ Download the files required to begin working through the first tutorial example
1818

1919
#What is jQuery?
2020

21-
jQuery is a JavaScript library that supplies you with functionality independent of browser platform. It's very commonly used on the internet and enables you to do more with writing less code.
21+
jQuery is a JavaScript library that supplies you with functionality independent of browser platform. It's very commonly used on the internet and enables you to do more with less code.
2222

2323
##Selectors
2424

2525
Selectors are simplified in jQuery. You can access elements by element type, id or class, just like in `CSS`.
2626

27-
For example, to retrieve all paragraph elements you can use this selector `$("p")` or to retrieve all elements with a specific id `$("#message")` instead of using `getElementByTag('p')` or `getElementById('message')`.
27+
For example, to retrieve all paragraph elements you can use this selector `$("p")` or to retrieve all elements with a specific id `$("#message")` instead of using `getElementByTag("p")` or `getElementById("message")`.
2828

2929
```javascript
3030
$("p") // all paragraph elemenets
@@ -34,7 +34,7 @@ $("ol#items") // ordered list elements with the ID items
3434
$("ol#items li") // list elements, within an ordered list with the id colors
3535
```
3636

37-
You can also use CSS3 selectors
37+
You can also use CSS3 selectors.
3838

3939
```javascript
4040
$("input[type=text]"); // inputs of type text
@@ -54,7 +54,7 @@ $('#logo').attr('width', 300)
5454

5555
##Changing CSS attributes
5656

57-
You can get and set the CSS properties of an item by using the `css()` action.
57+
You can get and set the CSS properties of an element with the `css()` method.
5858

5959
```js
6060
var heading = $('h1');
@@ -69,7 +69,6 @@ To empty an input field, you can set value to an empty string.
6969

7070
```javascript
7171
$('input').val("");
72-
7372
```
7473

7574
##Adding content
@@ -92,7 +91,7 @@ $('#container').replaceWith("<div>I love jQuery!</div>")
9291
9392
##Handling Events
9493

95-
Events is what happens when you interact with a website. Some events that you can capture are a **change** in an input field, a mouse **click** or even **focus** on an element. You can find a [all the events here](http://api.jquery.com/category/events/)
94+
Events are what happen when you interact with a website. Some events that you can capture are a **change** in an input field, a mouse **click** or even **focus** on an element. You can find a list of [all the events here](http://api.jquery.com/category/events/).
9695

9796
We've learned in the previous lesson how to bind events on **click** by setting **onclick** to the HTML element..
9897

0 commit comments

Comments
 (0)