title: Client-side jQuery application with MongoDB
body: <p>I'm trying to write a very simple example application to familiarize myself with using MongoDB. Essentially, I'd like to have a single web page which queries a local MongoDB server, adding and removing content dynamically using jQuery. I have no problem at all throwing together the page layout and the jQuery, but I'm getting more and more confused by the MongoDB part of the equation. I understand that MongoDB is a <em>server</em> and runs remotely from the client, but for my example, I simply want to be able to query quickly and easily from client-side in-browser JavaScript:</p>
  
  <pre><code>$("#toggle").click(function() {
      if ($(this).is(":checked") {
          // add items from mongodb
          addItems(mongodb.test.find({ age: { $gt: 5 }}));
      } else {
          $("#results").hide();
      }
  });
  </code></pre>
  
  <p>Is there a way to interface with MongoDB this way?</p>