From efa7d0b71c4d1b48c8e896c327865787337188cf Mon Sep 17 00:00:00 2001 From: Brad Dunbar Date: Fri, 7 Jun 2013 16:56:50 -0400 Subject: [PATCH] Fix #1141 - Update _.bindAll docs. --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index d59b9bad1..0c295da57 100644 --- a/index.html +++ b/index.html @@ -952,7 +952,7 @@

Function (uh, ahem) Functions

- bindAll_.bindAll(object, [*methodNames]) + bindAll_.bindAll(object, *methodNames)
Binds a number of methods on the object, specified by methodNames, to be run in the context of that object whenever they @@ -966,9 +966,9 @@

Function (uh, ahem) Functions

onClick : function(){ alert('clicked: ' + this.label); }, onHover : function(){ console.log('hovering: ' + this.label); } }; -_.bindAll(buttonView); +_.bindAll(buttonView, 'onClick', 'onHover'); +// When the button is clicked, this.label will have the correct value. jQuery('#underscore_button').bind('click', buttonView.onClick); -=> When the button is clicked, this.label will have the correct value...