Skip to content

Pages: grammatical proofreading #688

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 1 commit 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/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ The new `$.afterDOMReady()` helper method provides proper timing after the DOM i

While jQuery offers all the event binding one may need, it can become a bit cumbersome to handle events that are only supposed to be dealt with once.

For instance, you may wish to have a button that will open a panel the first time it is clicked and leave it open afterwards or take special initialization actions the first time said button is clicked. When dealing with such a situation, one usually end up with code like this:
For instance, you may wish to have a button that will open a panel the first time it is clicked and leave it open afterward or take special initialization actions the first time said button is clicked. When dealing with such a situation, one usually ends up with code like this:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word afterwards is a British English spelling. In the interest of consistency, this replaces it with the American English spelling.
https://github.com/jquery/api.jquery.com#spelling

The plural verb end does not agree with the singular subject one. This changes the verb form for subject-verb agreement.


```
var buttonClicked = false;
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 @@ -87,7 +87,7 @@ Another way of clearing the queue is to call `.stop( true )`. That will stop the

## Replacing The Queue

When you pass an array of functions as second argument to `.queue()`, that array will replace the queue.
When you pass an array of functions as the second argument to `.queue()`, that array will replace the queue.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It appears that the phrase second argument does not contain the correct article usage.


```
$( ".box" )
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 @@ -7,7 +7,7 @@ jQuery offers several ways to extend its event system to provide custom function

This document covers the extensions available starting with jQuery 1.7; a sparsely documented subset of this functionality has been available since jQuery 1.3 but the differences in functionality are extensive. For an overview of special events in earlier versions, see [Ben Alman's jQuery Special Events](http://benalman.com/news/2010/03/jquery-special-events/) article.

<div class="warning">**Note:** jQuery event extensions are an advanced feature; they require deeper knowledge of both browser behavior and jQuery internals than most of the API. Most users of jQuery will not need to use event extensions, and those who do should use them with care. For example, on a large project with third-party plugins, changing the behavior of standard events such as `click` or `mouseover` can cause serious compatibility issues.</div>
<div class="warning">**Note:** jQuery event extensions are an advanced feature; they require a deeper knowledge of both browser behavior and jQuery internals than most of the API. Most users of jQuery will not need to use event extensions, and those who do should use them with care. For example, on a large project with third-party plugins, changing the behavior of standard events such as `click` or `mouseover` can cause serious compatibility issues.</div>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The noun phrase deeper knowledge seems to be missing a determiner before it.


### Events overview and general advice

Expand Down
2 changes: 1 addition & 1 deletion page/events/introduction-to-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ In this slightly different example, we're defining a function called `sayHello`

But what about that `event` argument in the `sayHello` function — what is it and why does it matter? In all DOM event callbacks, jQuery passes an *event object* argument which contains information about the event, such as precisely when and where it occurred, what type of event it was, which element the event occurred on, and a plethora of other information. Of course you don't have to call it `event`; you could call it `e` or whatever you want to, but `event` is a pretty common convention.

If the element has default functionality for a specific event (like a link opens a new page, a button in a form submits the form, etc.), that default functionality can be cancelled. This is often useful for Ajax requests. When a user clicks on a button to submit a form via Ajax, we'd want to cancel the button/form's default action (to submit it to the form's `action` attribute), and we would instead do an Ajax request to accomplish the same task for a more seamless experience. To do this, we would utilize the event object and call its `.preventDefault()` method. We can also prevent the event from bubbling up the DOM tree using `.stopPropagation()` so that parent elements aren't notified of its occurrence (in the case that event delegation is being used).
If the element has default functionality for a specific event (like a link opens a new page, a button in a form submits the form, etc.), that default functionality can be canceled. This is often useful for Ajax requests. When a user clicks on a button to submit a form via Ajax, we'd want to cancel the button/form's default action (to submit it to the form's `action` attribute), and we would instead do an Ajax request to accomplish the same task for a more seamless experience. To do this, we would utilize the event object and call its `.preventDefault()` method. We can also prevent the event from bubbling up the DOM tree using `.stopPropagation()` so that parent elements aren't notified of its occurrence (in the case that event delegation is being used).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word cancelled is a British English spelling. In the interest of consistency, this replaces it with the American English spelling.
https://github.com/jquery/api.jquery.com#spelling


```
// Preventing a default action from occurring and stopping the event bubbling
Expand Down
4 changes: 2 additions & 2 deletions page/jquery-mobile/theme-roller.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ The easiest way to create custom themes is with the ThemeRoller tool. It allows

### Creating the Theme Swatches

The [ThemeRoller](http://jquerymobile.com/themeroller/) allows users to create their own theme through an easy to use drag and drop interface. By default, ThemeRoller offers three swatches (a, b and c). You can use the offered default colors, the Adobe kuler colors, or create your own. You will create your theme by dragging the chosen color onto the chosen element in the swatch of your choice. You can add more swatches by pressing the "+" sign near the "A", "B", and "C" tabs, in the left-hand side menu.
The [ThemeRoller](http://jquerymobile.com/themeroller/) allows users to create their own theme through an easy to use drag and drop interface. By default, ThemeRoller offers three swatches (a, b and c). You can use the offered default colors, the Adobe Kuler colors, or create your own. You will create your theme by dragging the chosen color onto the chosen element in the swatch of your choice. You can add more swatches by pressing the "+" sign near the "A", "B", and "C" tabs, in the left-hand side menu.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because Adobe Kuler is a proper noun, it should be capitalized.
https://learn.jquery.com/style-guide/#spelling


You can further edit your swatch from the menu. For example, you can expand the various element parts and carry out detailed editing. This will allow you to change text color, text shadow size, position and color, etc. You can also edit the gradient used on each element.

Here are two examples of theme swatches created, one with the default colors, and one with the kuler colors:
Here are two examples of theme swatches created, one with the default colors, and one with the Kuler colors:

![picture Default colors theme example](/resources/jquery-mobile/Theme.png "Default colors theme example") ![picture Kuler theme example](/resources/jquery-mobile/Kuler.png "Kuler theme example")

Expand Down
12 changes: 6 additions & 6 deletions page/jquery-ui/environments/bower.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ As an example, suppose we're starting a new project and we need to use [jQuery U
</html>
```

This examples fails with a JavaScript error because neither jQuery core nor jQuery UI are loaded. Let's load them with Bower.
This example fails with a JavaScript error because neither jQuery core nor jQuery UI are loaded. Let's load them with Bower.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This (singular) example fails with a JavaScript error...


### Downloading jQuery UI With Bower

Libraries are downloaded with Bower using the `bower install` command. To install jQuery UI, run `bower install jquery-ui`. Doing so creates the following (simplified) directory structure.

*Note: If you get an error that the `bower` command is not found, checkout [Bower's installation instructions](http://bower.io/#installing-bower).*
*Note: If you get an error that the `bower` command is not found, check out [Bower's installation instructions](http://bower.io/#installing-bower).*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkout (noun) => check out (verb)


<pre>
.
Expand Down Expand Up @@ -85,7 +85,7 @@ We have a few different options for using the files downloaded with Bower. The e
<link rel="stylesheet" href="bower_components/jquery-ui/themes/smoothness/jquery-ui.min.css">
</head>
<body>

<div id="projects">
<h3>jQuery Core</h3>
<p>jQuery is a fast, small, and feature-rich JavaScript library...</p>
Expand All @@ -94,13 +94,13 @@ We have a few different options for using the files downloaded with Bower. The e
<h3>jQuery Mobile</h3>
<p>jQuery Mobile is a HTML5-based user interface system...</p>
</div>

<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/jquery-ui/jquery-ui.min.js"></script>
<script>
$( "#projects" ).accordion();
</script>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize, but my editor ate this whitespace on file save. Please let me know if I should put it back in.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, thanks!

</body>
</html>
```
Expand Down Expand Up @@ -140,4 +140,4 @@ Because Bower also downloaded jQuery UI's individual source files, we can altern
</html>
```

From here, you can hook jQuery UI's files into your own custom build system to concatenate and minify your resources for production. If you're a RequireJS user, checkout our [guide on how to use jQuery UI with AMD](/jquery-ui/environments/amd/).
From here, you can hook jQuery UI's files into your own custom build system to concatenate and minify your resources for production. If you're a RequireJS user, check out our [guide on how to use jQuery UI with AMD](/jquery-ui/environments/amd/).
2 changes: 1 addition & 1 deletion page/jquery-ui/theming.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

All jQuery UI plugins are designed to allow a developer to seamlessly integrate UI widgets into the look and feel of their site or application. Each plugin is styled with CSS and contains two layers of style information: standard [jQuery UI CSS Framework](http://api.jqueryui.com/theming/css-framework/) styles and plugin-specific styles.

The jQuery UI CSS Framework provide semantic presentation classes to indicate the role of an element within a widget such as a header, content area, or clickable region. These are applied consistently across all widgets so a clickable tab, accordion, or button will all have the same `ui-state-default` class applied to indicate that it is clickable. When a user mouses over one of these elements, this class is changed to `ui-state-hover`, then `ui-state-active` when selected. This level of class consistency makes it easy to ensure that all elements with a similar role or interaction state will look the same across all widgets.
The jQuery UI CSS Framework provides semantic presentation classes to indicate the role of an element within a widget such as a header, content area, or clickable region. These are applied consistently across all widgets so a clickable tab, accordion, or button will all have the same `ui-state-default` class applied to indicate that it is clickable. When a user mouses over one of these elements, this class is changed to `ui-state-hover`, then `ui-state-active` when selected. This level of class consistency makes it easy to ensure that all elements with a similar role or interaction state will look the same across all widgets.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subject-verb agreement
The Framework provide classes => The Framework provides classes


The CSS Framework styles are encapsulated in a single file called `theme.css` and this is the file modified by the [ThemeRoller](/jquery-ui/themeroller/) application. Framework styles only include attributes that affect the look and feel (primarily color, background images, and icons) so these are "safe" styles that will not affect functionality of individual plugins. This separation means that a developer can create a custom look and feel by modifying the colors and images in the `theme.css` file and know that as future plugins or bug fixes become available, these should work with the theme without modification.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,6 @@ $.widget( "custom.progressbar", {

## Closing Comments

The widget factory is only one way of creating stateful plugins. There are a few different models that can be used and each have their own advantages and disadvantages. The widget factory solves lots of common problems for you and can greatly improve productivity, it also greatly improves code reuse, making it a great fit for jQuery UI as well as many other stateful plugins.
The widget factory is only one way of creating stateful plugins. There are a few different models that can be used and each has their own advantages and disadvantages. The widget factory solves lots of common problems for you and can greatly improve productivity, it also greatly improves code reuse, making it a great fit for jQuery UI as well as many other stateful plugins.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subject-verb agreement

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ericcarraway shall we go all the way and change "each has their own" to "each has its own"?


You may have noticed that in this article we used the `custom` namespace. The `ui` namespace is reserved for official jQuery UI plugins. When building your own plugins, you should create your own namespace. This makes it clear where the plugin came from and if it is part of a larger collection.
2 changes: 1 addition & 1 deletion page/plugins/advanced-plugin-concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ $( "<div class='gallery-wrapper' />" ).appendTo( "body" );
$( ".gallery-wrapper" ).append( "..." );
```

To allow users to access and even manipulate those information, you can store them in a variable containing the settings of your plugin. A better implementation of the previous code is shown below:
To allow users to access and even manipulate that information, you can store it in a variable containing the settings of your plugin. A better implementation of the previous code is shown below:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, a plural quantifer (those) was modifying a singular noun (information).


```
// Retain an internal reference:
Expand Down
2 changes: 1 addition & 1 deletion page/plugins/basic-plugin-creation.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Notice that to use `.css()`, another method, we use `this`, not `$( this )`. Thi

## 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 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:
This works, but there are 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:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(there is) a couple of things => there are a couple of things


```
$.fn.greenify = function() {
Expand Down