Skip to content

Commit

Permalink
No entities.
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Amalthea Magnuson committed Mar 5, 2013
1 parent dce8821 commit 062970f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions page/effects/custom-effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ $( "div.funtimes" ).animate({

**Note:** Color-related properties cannot be animated with `$.fn.animate` using jQuery
out of the box. Color animations can easily be accomplished by including the
[color plugin](http://github.com/jquery/jquery-color). We’ll discuss using
[color plugin](http://github.com/jquery/jquery-color). We'll discuss using
plugins later in the book.

### Easing

Definition: Easing describes the manner in which an effect occurs — whether
Definition: Easing describes the manner in which an effect occurs whether
the rate of change is steady, or varies over the duration of the animation.
jQuery includes only two methods of easing: swing and linear. If you want more
natural transitions in your animations, various easing plugins are available.
Expand Down
6 changes: 3 additions & 3 deletions page/effects/intro-to-effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ You may have noticed that `$.fn.show` and `$.fn.hide` use a combination of slide
when showing and hiding content in an animated way. If you would rather show or hide content with
one effect or the other, there are additional methods that can help. `$.fn.slideDown` and `$.fn.slideUp`
show and hide content, respectively, using only a slide effect. Slide animations are accomplished by
rapidly making changes to an element’s CSS `height` property.
rapidly making changes to an element's CSS `height` property.

```
// Hide all paragraphs using a slide up animation over 0.8 seconds
Expand All @@ -61,7 +61,7 @@ $( "div.hidden" ).slideDown( 600 );
```

Similarly `$.fn.fadeIn` and `$.fn.fadeOut` show and hide content, respectively, by means of a fade
animation. Fade animations involve rapidly making changes to an element’s CSS `opacity` property.
animation. Fade animations involve rapidly making changes to an element's CSS `opacity` property.

```
// Hide all paragraphs using a fade out animation over 1.5 seconds
Expand All @@ -73,7 +73,7 @@ $( "div.hidden" ).fadeIn( 750 );

##Changing Display Based on Current Visibility State

jQuery can also let you change a content’s visibility based on its current visibility state. `$.fn.toggle`
jQuery can also let you change a content's visibility based on its current visibility state. `$.fn.toggle`
will show content that is currently hidden and hide content that is currently visible. You can pass the
same arguments to `$.fn.toggle` as you pass to any of the effects methods above.

Expand Down
10 changes: 5 additions & 5 deletions page/effects/queue-and-dequeue-explained.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ level: beginner
source: http://jqueryfordesigners.com/api-queue-dequeue/
---

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

```
$( ".box" ).animate({
Expand All @@ -19,7 +19,7 @@ $( ".box" ).animate({
As I said though, these methods come in pairs, so anything you add using `queue()`,
you need to dequeue to allow the process to continue. In the code above, if I
chained more animations on, until I call `$( this ).dequeue()`, the subsequent
animations wouldn’t run:
animations wouldn't run:

```
$( ".box" ).animate({
Expand All @@ -32,7 +32,7 @@ $( ".box" ).animate({
});
```

Keeping in mind that the animation won’t continue until we’ve explicitly called
Keeping in mind that the animation won't continue until we've explicitly called
`dequeue()`, we can easily create a pausing plugin, by adding a step in the queue
that sets a timer and triggers after `n` milliseconds, at which time, it dequeues
the element:
Expand All @@ -55,4 +55,4 @@ $( ".box" ).animate({
```

Remember that the first argument for `queue()` and `dequeue()` is `fx`, and that in
all of these examples I’m not including it because jQuery sets the argument to `fx` by default — so I don’t have to specify it.
all of these examples I'm not including it because jQuery sets the argument to `fx` by default so I don't have to specify it.
8 changes: 4 additions & 4 deletions page/effects/uses-of-queue-and-dequeue.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ queue by calling `.queue()`, and you remove (by calling) the functions using

To understand the internal jQuery queue functions, reading the source and
looking at examples helps me out tremendously. One of the best examples of a
queue function I’ve seen is `.delay()`:
queue function I've seen is `.delay()`:

```
$.fn.delay = function( time, type ) {
Expand Down Expand Up @@ -42,12 +42,12 @@ The default queue in jQuery is `fx`. The default queue has some special
properties that are not shared with other queues.

- Auto Start: When calling `$(elem).queue( function() {} );` the fx queue will
automatically dequeue the next function and run it if the queue hasn’t
automatically dequeue the next function and run it if the queue hasn't
started.
- “inprogress” sentinel: Whenever you `dequeue()` a function from the fx queue,
it will `unshift()` (push into the first location of the array) the string
“inprogress” — which flags that the queue is currently being run.
- It’s the default! The fx queue is used by `.animate()` and all functions that
“inprogress” which flags that the queue is currently being run.
- It's the default! The fx queue is used by `.animate()` and all functions that
call it by default.

**Note:** If you are using a custom queue, you must manually `.dequeue()` the functions, they will not auto start!
Expand Down

0 comments on commit 062970f

Please sign in to comment.