title: empty div not getting recognised in javascript
body: <p>i am creating an empty div in the javascript DOM. but when i call some function on it, for example, </p>
  
  <pre><code>    var hover = document.createElement("div");
      hover.className = "hover";
      overlay.appendChild(hover);
      hover.onClick = alert("hi");
  </code></pre>
  
  <p>the onClick function isn't working. Instead it displays an alert as soon as it reaches the div creation part of the script.  What am i doing wrong?</p>