Browse files

Updated readme to explain methods

  • Loading branch information...
1 parent 3e8bbc5 commit 40b18dada52006b3141eb270772f31707d9d5a3f @lukemorton committed Jan 5, 2011
Showing with 19 additions and 9 deletions.
  1. +19 −9 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

0 comments on commit 40b18da

Please sign in to comment.