title: jquery simple example change() function
body: <p>I'm just learning jQuery, I'm so noob.</p>
  
  <p>see, we have 2 divs as follows:</p>
  
  <pre><code>&lt;div id="div1"&gt;
  &lt;ul&gt;
      &lt;li&gt; This is Line 1&lt;/li&gt;
      &lt;li&gt; This is Line 2&lt;/li&gt;
      &lt;li&gt; This is Line 3&lt;/li&gt;
      &lt;li&gt; This is Line 4&lt;/li&gt;
      &lt;li&gt; This is Line 5&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  
  &lt;div id="div2"&gt;
  &lt;ul&gt;
      &lt;li&gt; &lt;input type="text" /&gt;&lt;/li&gt;
      &lt;li&gt; &lt;input type="text" /&gt;&lt;/li&gt;
      &lt;li&gt; &lt;input type="text" /&gt;&lt;/li&gt;
      &lt;li&gt; &lt;input type="text" /&gt;&lt;/li&gt;
      &lt;li&gt; &lt;input type="text" /&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>since I'm just learning change() function, this is what I want to do:
  When each value of input boxes in div2 changes, the div1 li of the same number should be changed to the entered value, for example if we start typing in the second input box in div2, the second li text should go what we entered in the second input box.</p>
  
  <p>here is what i've tried so far, but not working:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $('#div2 :input').change(function(i){
              var str = $(this).text;
              $('#div1 li').eq(i).text(str);
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>what's wrong with this?
  Thanks in advance</p>