Skip to content

Commit

Permalink
Fix jashkenas#1141 - Update _.bindAll docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
braddunbar committed Jun 7, 2013
1 parent 77e13ab commit efa7d0b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ <h2 id="functions">Function (uh, ahem) Functions</h2>
</pre>

<p id="bindAll">
<b class="header">bindAll</b><code>_.bindAll(object, [*methodNames])</code>
<b class="header">bindAll</b><code>_.bindAll(object, *methodNames)</code>
<br />
Binds a number of methods on the <b>object</b>, specified by
<b>methodNames</b>, to be run in the context of that object whenever they
Expand All @@ -966,9 +966,9 @@ <h2 id="functions">Function (uh, ahem) Functions</h2>
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);
=&gt; When the button is clicked, this.label will have the correct value...
</pre>

<p id="partial">
Expand Down

0 comments on commit efa7d0b

Please sign in to comment.