title: trying to understand one jquery example
body: <pre><code>   &lt;!DOCTYPE html&gt;
     &lt;html&gt;
        &lt;head&gt;
           &lt;script src="http://code.jquery.com/jquery-1.9.1.js"&gt;&lt;/script&gt;
        &lt;/head&gt;
        &lt;body&gt;
           &lt;a href="http://jquery.com"&gt;default click action is prevented&lt;/a&gt;
           &lt;div id="log"&gt;&lt;/div&gt;
           &lt;script&gt;
              $("a").click(function(event) {
                 event.preventDefault();
                 $('&lt;div/&gt;')
                    .append('default ' + event.type + ' prevented')
                    .appendTo('#log');
              });
           &lt;/script&gt;
        &lt;/body&gt;
     &lt;/html&gt;
  </code></pre>
  
  <p>Above code is taken from: <a href="http://api.jquery.com/event.preventDefault/" rel="nofollow">http://api.jquery.com/event.preventDefault/</a></p>
  
  <p>Question:</p>
  
  <ol>
  <li><p><code>function(event)</code>, I know here event means:click, but how did the click object pass the value to this parameter:event?</p></li>
  <li><pre><code>$('&lt;div/&gt;')
  .append('default ' + event.type + ' prevented')
  .appendTo('#log');
  </code></pre></li>
  </ol>
  
  <p>I know <code>append()</code> and <code>appendTo()</code>, but still had a hard time to understand this line,  <code>$('&lt;div/&gt;')</code> means to create a <code>&lt;div/&gt;</code>? Usually I only see this style:   <code>$('div').append()</code>, can anyone explain this line to me? thanks.</p>