title: setInterval() only running function once
body: <p>I want to periodically query a PHP script for new messages. To do so, I'm using the setInterval() function and AJAX.</p>
  
  <pre><code>$(document).ready(function(){
  
      var queryInterval = 1000; /* How fast we query for new messages */
  
      setInterval(getMessages(), queryInterval);
  
      function getMessages() {
          console.log("tick");
      }
  
  });
  </code></pre>
  
  <p>However, when I look at the Javascript console, I'm only seeing "tick" once. I've made sure that the console doesn't ignore any more logs of the same strings, so if the code was working properly it should show "tick" in the console every second.</p>
  
  <p>Anyone know what could be going wrong here?</p>