Skip to content

This fixes a bunch of typos throughout 15 of the pages. #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion page/code-organization/deferreds.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ promise.then( function( futureValue ) {
In the case of certain applications, it is necessary to have several
results returned before your application can continue at all (for
example, displaying a dynamic set of options on a screen before a user
is able to select the option that interests them).Where this is the
is able to select the option that interests them). Where this is the
case, a method called 'when' exists, which can be used to perform some
action once all the promises have been fully fulfilled:

Expand Down
2 changes: 1 addition & 1 deletion page/effects/intro-to-effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ $("p").hide( 500 );
$("div.hidden").show( 1250 );
```

Most developers pass in a number of milleseconds to have more precise control
Most developers pass in a number of milliseconds to have more precise control
over the duration.

##Fade and Slide Animations
Expand Down
2 changes: 1 addition & 1 deletion page/effects/queue-and-dequeue-explained.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ source: http://jqueryfordesigners.com/api-queue-dequeue/
---

When you use the animate and show, hide, slideUp, etc effect methods, you’re
adding a job on to the fx queue.By default, using queue and passing a function,
adding a job on to the fx queue. By default, using queue and passing a function,
will add to the fx queue. So we’re creating our own bespoke animation step:

```
Expand Down
2 changes: 1 addition & 1 deletion page/events/event-delegation.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ $("#list").on( "click", "a", function( event ) {
```
This simply passes the `.is()` method a selector to see if the element"s `href` attributes starts with "http". Also we have removed the `event.preventDefault();` statement, this is because we want the default action to happen (which is to following the `href`)

We can actually take this a step further and make our code simpiler and more concise by allowing the selector argument to `.on()` do our logic for us.
We can actually take this a step further and make our code simpler and more concise by allowing the selector argument to `.on()` do our logic for us.
```
// attach a delegated event with a more refined selector
$("#list").on( "click", "a[href^=http]", function( event ) {
Expand Down
2 changes: 1 addition & 1 deletion page/events/event-extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ props: Array
: Strings representing properties that should be copied from the browser's event object to the jQuery event object. If omitted, no additional properties are copied beyond the standard ones that jQuery copies and normalizes (e.g., `event.target` and `event.relatedTarget`).

filter: Function( event, originalEvent )
: jQuery calls this function after it constructs the `jQuery.Event` object, copies standard properties from `jQuery.event.props`, and copies the `fixHooks`-specific props (if any) specified above. The function can create new properties on the event object or modify existing ones. The second argument is the browser's native event object, which is also availble in `event.originalEvent`.
: jQuery calls this function after it constructs the `jQuery.Event` object, copies standard properties from `jQuery.event.props`, and copies the `fixHooks`-specific props (if any) specified above. The function can create new properties on the event object or modify existing ones. The second argument is the browser's native event object, which is also available in `event.originalEvent`.

Note that for all events, the browser's native event object is available in `event.originalEvent`; if the jQuery event handler examines the properties there instead of jQuery's normalized `event` object, there is no need to create a `fixHooks` entry to copy or modify the properties.

Expand Down
2 changes: 1 addition & 1 deletion page/events/history-of-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ When we use `.live()` our event is bound to `$( document )`. When the `<li>` is
* `<html>`
* *document* root

The last element to recieve the *click* event is *document*, this is where our `.live()` event is bound. `.live()` will then check to see if our selector `#list li` is the element that triggered the event, if so our event handler is executed.
The last element to receive the *click* event is *document*, this is where our `.live()` event is bound. `.live()` will then check to see if our selector `#list li` is the element that triggered the event, if so our event handler is executed.


### [.live()](http://api.jquery.com/live/) w/ context (Deprecated)
Expand Down
4 changes: 2 additions & 2 deletions page/events/triggering-event-handlers.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ $("a").trigger("click");
## How can I mimic a native browser event, if not `.trigger()`?

In order to trigger a native browser event, you have to use [document.createEventObject](http://msdn.microsoft.com/en-us/library/ie/ms536390%28v=vs.85%29.aspx) for < IE9 and [document.createEvent](https://developer.mozilla.org/en/DOM/document.createEvent) for all other browsers.
Using these two APIs, you can programatically create an event that behaves exactly as if someone has actually clicked on a file input box. The default action will happen, and the browse file dialog will display.
Using these two APIs, you can programmatically create an event that behaves exactly as if someone has actually clicked on a file input box. The default action will happen, and the browse file dialog will display.

The jQuery UI Team created [jquery.simulate.js](https://github.com/eduardolundgren/jquery-simulate/blob/master/jquery.simulate.js) in order to simplify triggering a native browser event for use in their automated testing. Its usage is modeled after jQuery's trigger.

Expand All @@ -49,7 +49,7 @@ There are four differences between `.trigger()` and `.triggerHandler()`
1. `.triggerHandler()` only triggers the event on the first element of a jQuery object.
2. `.triggerHandler()` cannot be chained. It returns the value that is returned by the last handler, not a jQuery object.
3. `.triggerHandler()` will not cause the default behavior of the event (such as a form submission).
4. Events triggered by `.triggerHandler()`, will not bubble up the DOM heirarchy. Only the handlers on the single element will fire.
4. Events triggered by `.triggerHandler()`, will not bubble up the DOM hierarchy. Only the handlers on the single element will fire.

For more information see the [triggerHandler documentation](http://api.jquery.com/triggerHandler)

Expand Down
2 changes: 1 addition & 1 deletion page/javascript-101/loops.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ for ( [initialisation]; [conditional]; [iteration] ) {

The _initialisation_ statement is executed only once, before the loop starts. It gives you an opportunity to prepare or declare any variables.

The _conditional_ statement is executed before each iteration, and its return value decides whether the loop is to continue. If the conditional statement evaluates to a falsey value, then the loop stops.
The _conditional_ statement is executed before each iteration, and its return value decides whether the loop is to continue. If the conditional statement evaluates to a falsy value, then the loop stops.

The _iteration_ statement is executed at the end of each iteration and gives you an opportunity to change the state of important variables. Typically, this will involve incrementing or decrementing a counter and thus bringing the loop closer to its end.

Expand Down
4 changes: 2 additions & 2 deletions page/javascript-101/syntax-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ JavaScript has support for single and multi-line comments. Comments are ignored

### Whitespace

Whitespace is also ignored in JavaScript. There are many tools that will strip out all the whitespace in a program, reducing the overall file size and improving network latency. Given the availability of tools like these, whitespace should be leveraged to make the code as readible as possible.
Whitespace is also ignored in JavaScript. There are many tools that will strip out all the whitespace in a program, reducing the overall file size and improving network latency. Given the availability of tools like these, whitespace should be leveraged to make the code as readable as possible.

```
// Whitespace is insignificant.
Expand Down Expand Up @@ -64,7 +64,7 @@ Identifiers are used to give variables and functions a unique name so they can s
* Can only be composed of letters, numbers, dollar signs, and underscores.
* The first character cannot be a number.

It's a best practice to name identifers in a way that will make sense to you and other developers later on.
It's a best practice to name identifiers in a way that will make sense to you and other developers later on.

```
// Valid identifier names.
Expand Down
2 changes: 1 addition & 1 deletion page/plugins/advanced-plugin-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ $.fn.hilight = function( options ) {

// build element specific options
// This changed line tests to see if the Metadata Plugin is installed,
// andif it is, it extends our options object with the extracted metadata.
// and if it is, it extends our options object with the extracted metadata.
var o = $.meta ? $.extend( {}, opts, $this.data() ) : opts;

//...
Expand Down
6 changes: 3 additions & 3 deletions page/plugins/basic-plugin-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Notice that to use `css()`, another method, we use `this`, not `$( this )`. This

##Chaining

This works, but there's a couple of things we need to do for our plugin to survive in the real world. One of jQuery's features is chaining, when you link five or six actions onto one selector. This is accomplished by having all jQuery object methods return the original jQuery object again (there are a few exeptions: `width()` called without parameters returns the width of the selected element, and is not chainable). Making our plugin method chainable takes one line of code:
This works, but there's a couple of things we need to do for our plugin to survive in the real world. One of jQuery's features is chaining, when you link five or six actions onto one selector. This is accomplished by having all jQuery object methods return the original jQuery object again (there are a few exceptions: `width()` called without parameters returns the width of the selected element, and is not chainable). Making our plugin method chainable takes one line of code:

```
$.fn.greenify = function() {
Expand Down Expand Up @@ -127,7 +127,7 @@ It would be much better to have one slot, and use parameters to control what act

## Using the `each()` Method
Your typical jQuery object will contain references to any number of DOM elements, and that's why jQuery objects are often referred to as collections.
If you want to do any manipulating with specific elements (eg: getting data an attribute, calculating specific positions) then you need to use `each()` to
If you want to do any manipulating with specific elements (e.g. getting data an attribute, calculating specific positions) then you need to use `each()` to
loop through the elements.

```
Expand Down Expand Up @@ -182,7 +182,7 @@ $("div").greenify({
});
```

The default value for `color` of `#556B2F` gets overriden by `$.extend()` to be orange.
The default value for `color` of `#556B2F` gets overridden by `$.extend()` to be orange.

##Putting It Together

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source: http://docs.jquery.com/Frequently_Asked_Questions
Either the :eq() selector or the .eq() method will allow you to select the proper item. However, to replace the text, you must get the value before you set it:

```
// This doesn"t work; text() returns a string, not the jQuery object
// This doesn't work; text() returns a string, not the jQuery object
$( this ).find("li a").eq( 2 ).text().replace( "foo", "bar" );

// This works
Expand All @@ -17,4 +17,4 @@ var linkText = $thirdLink.text().replace( "foo", "bar" );
$thirdLink.text( linkText );
```

The first example just discards the modified text. The second example saves the modified text and then replaces the old text with the new modified text. Remember, .text() gets; .text("foo") sets.
The first example just discards the modified text. The second example saves the modified text and then replaces the old text with the new modified text. Remember, .text() gets; .text("foo") sets.
2 changes: 1 addition & 1 deletion page/using-jquery-core/selecting-elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ In order to get the best performance using `:radio`, first select elements with
$("form :reset");
```

In order to get the best performance using `:reset`, wfirst select elements with a standard jQuery selector, then use `.filter(":reset")`, or precede the pseudo-selector with a tag name or some other selector.
In order to get the best performance using `:reset`, first select elements with a standard jQuery selector, then use `.filter(":reset")`, or precede the pseudo-selector with a tag name or some other selector.

**Note:** for better performance in modern browsers, use `[ type = "reset" ]` instead of the `:reset` pseudo-selector.

Expand Down
8 changes: 4 additions & 4 deletions page/using-jquery-core/traversing.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,17 +69,17 @@ $("div.grandparent").find("div");
The rest of the traversal methods within jQuery all deal with finding sibling selections. There are a few basic methods as far as the direction of traversal is concerned. You can find previous elements with `$.fn.prev()`, next elements with `$.fn.next()`, and both with `$.fn.siblings()`. There are also a few other methods that build onto these basic methods: `$.fn.nextAll()`, `$.fn.nextUntil()`, `$.fn.prevAll()` and `$.fn.prevUntil()`.

```
// Selecing a next sibling of the selectors
// Selecting a next sibling of the selectors

// returns [ div.surrogateParent1 ]
$("div.parent").next();

// Selecing a prev sibling of the selectors
// Selecting a prev sibling of the selectors

// returns [] as No sibling exists before div.parent
$("div.parent").prev();

//Selecting all the next siblings of the selector
// Selecting all the next siblings of the selector

// returns [ div.surrogateParent1, div.surrogateParent2 ]
$("div.parent").nextAll();
Expand All @@ -88,7 +88,7 @@ $("div.parent").nextAll().first();
// returns [ div.surrogateParent2 ]
$("div.parent").nextAll().last();

//Selecting all the previous siblings of the selector
// Selecting all the previous siblings of the selector

// returns [ div.surrogateParent1, div.parent ]
$("div.surrogateParent2").prevAll();
Expand Down
2 changes: 1 addition & 1 deletion page/using-jquery-core/understanding-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ var $div = $("#last");
console.log( "Index: " + $div.index("div") ); // 2
```

When `.index()` is called with a string argument, there are two things to consider. First, jQuery will implicitly call `.first()` on the original jQuery object. It will be find the index of the first element, not the last element in this case. This is inconsist, so be careful here.
When `.index()` is called with a string argument, there are two things to consider. First, jQuery will implicitly call `.first()` on the original jQuery object. It will be find the index of the first element, not the last element in this case. This is inconsistent, so be careful here.

The second point to consider is that jQuery is querying the entire DOM using the passed in string selector and checking the index within that newly queried jQuery object. For example, when using `.index("div")` in the last example above, jQuery is selecting all of the `<divs>` in the document, then searching for the index that contains the first element in the jQuery object `.index()` is called on.

Expand Down