Permalink
Browse files

Fixing typo.

  • Loading branch information...
1 parent 5104bb8 commit fc3767a4ec432202fd76c9015caf75cff6cd89f2 @pwhisenhunt pwhisenhunt committed Dec 30, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 book/index.html
View
@@ -4519,7 +4519,7 @@ <h3>Example 1: Centralized event handling</h3>
As the types of components mentioned often have the same repeating markup for each section (e.g. each section of an accordion), there's a good chance the behavior of each element that may be clicked is going to be quite similar and relative to similar classes nearby. We'll use this information to construct a very basic accordion using the Flyweight below.
</p>
<p>
-A stateManager namespace is used here encapsulate our flyweight logic whilst jQuery is used to bind the initial click to a container div. In order to ensure that no other logic on the page is attaching similar handles to the container, an unbind event is first applied.
+A stateManager namespace is used here to encapsulate our flyweight logic whilst jQuery is used to bind the initial click to a container div. In order to ensure that no other logic on the page is attaching similar handles to the container, an unbind event is first applied.
</p>
<p>
Now to establish exactly what child element in the container is clicked, we make use of a <code>target</code> check which provides a reference to the element that was clicked, regardless of its parent. We then use this information to handle the click event without actually needing to bind the event to specific children when our page loads.

0 comments on commit fc3767a

Please sign in to comment.