Skip to content
Browse files

Fixes to missing class, other tweaks.

  • Loading branch information...
1 parent 157837d commit de03dd73a2b868062d5c825c2f997287f2dfc562 @addyosmani committed
Showing with 5 additions and 4 deletions.
  1. +5 −4 book/index.html
View
9 book/index.html
@@ -1806,15 +1806,16 @@ <h2 id="observerpatternjavascript">The Observer Pattern</h2>
<pre class="brush: js">
-// A very simple new message handler
+// A very simple new mail handler
// A count of the number of messages received
var mailCounter = 0;
// Initialize subscribers that will listen out for a topic
// with the name "inbox/newMessage". This could correspond
-// to a new e-mail (message) being received
+// to a new message being received
+// Renders a preview of new messages
var subscriber1 = subscribe( "inbox/newMessage", function( topic, data ) {
// Log the topic for debugging purposes
@@ -1822,8 +1823,8 @@ <h2 id="observerpatternjavascript">The Observer Pattern</h2>
// Use the data that was passed from our subject
// to display a message preview to the user
- $( "messageSender" ).html( data.sender );
- $( "messagePreview" ).html( data.body );
+ $( ".messageSender" ).html( data.sender );
+ $( ".messagePreview" ).html( data.body );
});

0 comments on commit de03dd7

Please sign in to comment.
Something went wrong with that request. Please try again.