Skip to content

Commit

Permalink
Updating README files
Browse files Browse the repository at this point in the history
  • Loading branch information
padolsey committed Dec 19, 2009
1 parent db30562 commit 7fb4a62
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 33 deletions.
37 changes: 5 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,9 @@ jQuery Plugins

This repo will eventually contain a number of useful jQuery plugins. I'll normally release them on my site (http://james.padolsey.com) and then push them to Github.

Pulse
---
Plugins so far:

The pulse plugin provides a simple way to initiate pulsing on any element. Its API is very similar to jQuery's `animate()` method.

If you wanted to pulse an element's opacity, it's as simple as:

jQuery(element).pulse({
opacity: [1,0] // pulse between 1 and 0
}, 200, 5);

It will pulse between an opacity of one and zero, a total of 5 times. Each individual animation (from one value to another) will last 200 milliseconds, as specified in the second parameter.

It also accepts an options object as the second parameter to more clearly outline what you want. E.g.

jQuery(element).pulse({
fontSize: ['12px', '16px'],
opacity: [1,0]
}, {
times: 15, // pulse will run 15 times
duration: 500, // duration of each individual animation
complete: function() {
alert('Finished pulsing!');
}
});

So, the possible parameter patterns are:

jQuery().pulse( properties, duration, timesToRun, callbackFn );
jQuery().pulse( properties, duration, callbackFn );
jQuery().pulse( properties, options );

More info can be found here: http://james.padolsey.com/javascript/simple-pulse-plugin-for-jquery/
* [Pulse][1]


[1]: http://github.com/jamespadolsey/jQuery-Plugins/tree/master/pulse/
39 changes: 38 additions & 1 deletion pulse/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
a
Pulse
---

The pulse plugin provides a simple way to initiate pulsing on any element. Its API is very similar to jQuery's `animate()` method.

If you wanted to pulse an element's opacity, it's as simple as:

jQuery(element).pulse({
opacity: [1,0] // pulse between 1 and 0
}, 200, 5);

It will pulse between an opacity of one and zero, a total of five times. Each individual animation (from one value to another) will last 200 milliseconds, as specified in the second parameter.

It also accepts an options object as the second parameter to more clearly outline what you want. E.g.

jQuery(element).pulse({
fontSize: ['12px', '16px'],
opacity: [1,0]
}, {
times: 15, // pulse will run 15 times
duration: 500, // duration of each individual animation
complete: function() {
alert('Finished pulsing!');
}
});

So, the possible parameter patterns are:

jQuery().pulse( properties );
jQuery().pulse( properties, duration );
jQuery().pulse( properties, duration, timesToRun );
jQuery().pulse( properties, duration, timesToRun, easing );
jQuery().pulse( properties, duration, timesToRun, easing, callbackFn );
jQuery().pulse( properties, duration, easing );
jQuery().pulse( properties, duration, easing, callbackFn );
jQuery().pulse( properties, options );

More info can be found here: http://james.padolsey.com/javascript/simple-pulse-plugin-for-jquery/

0 comments on commit 7fb4a62

Please sign in to comment.