Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated readme to explain methods

  • Loading branch information...
commit 40b18dada52006b3141eb270772f31707d9d5a3f 1 parent 3e8bbc5
@drpheltright authored
Showing with 19 additions and 9 deletions.
  1. +19 −9 README.markdown
View
28 README.markdown
@@ -3,18 +3,28 @@
I didn't know what else to call these jQuery additions. So for
now Bind Bonuses they are!
-## $.fn.bindStop
+## The methods
+
+### $.fn.bindStop
-This method waits until delay time after the last
-occurance of event, then calls the callback.
+This method waits until `delay` ms after the last occurance of
+event, then calls the callback. So if you are continously typing
+only after you have stopped for the defined `delay` will the
+handler be called.
+
+### $.fn.bindThrottle
+
+This method only calls a callback if the event hasn't been
+called in the last `delay` ms. If it has been called it waits
+until after the throttle time to call it.
-@param | string | jQuery event, e.g. 'click', 'keydown'
-@param | object | jQuery event data
-@param | callback | Callback function
-@param | mixed | jQuery duration, e.g. 'slow', 'fast'
- | | or an integer (milliseconds)
-@return | this | -
+## Usage
+Both methods accept the same parameters which are identical to
+$.fn.bind apart from `bindStop` and `bindThrottle` accept a
+fourth parameter, `delay`, which accepts the jQuery speed
+keywords `slow` and `fast`. Alternatively you can provide
+milliseconds as an integer.
Peace xx
Please sign in to comment.
Something went wrong with that request. Please try again.