title: How to add Search with Meteor and Bootstrap?
body: <p>I am trying to implement searching in my Meteor app. I don't exactly understand how it ties together.  At this point, I have this following code:</p>
  
  <p>html:</p>
  
  <pre><code>&lt;form class="navbar-search pull-left"&gt;
    &lt;input type="text" class="search-query" placeholder="Search"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>js:</p>
  
  <pre><code>Template.menubar.events({
    'keyup input.search-query': function (evt) {
      console.log("Keyup value: " + evt.which);
      if (evt.which === 13) {
        console.log("Got an Enter keyup");
        Session.set("searchQuery", "justATestVar");
      }
    }
  });
  </code></pre>
  
  <p>I can see the values of keyup as I press different keys into the search box, so I know the event is being hit.  Capturing the "enter" keyup also works, but pressing enter causes the enter site to reload and when I do:</p>
  
  <pre><code>Session.get("searchQuery")
  </code></pre>
  
  <p>it returns undefined.</p>
  
  <p>I don't know if I'm handling this properly.  Essentially, I just want to get the value from the search box and then use that value for making a search on my collection.  Any help would be appreciated!  Thank you.</p>