title: jquery: how do I access this input value
body: <p>Demo: <a href="http://jsfiddle.net/mjmitche/sTzCS/39/" rel="nofollow">http://jsfiddle.net/mjmitche/sTzCS/39/</a></p>
  
  <p>I have this form with an unordered list inside of it. I have attached jquery's sortable() function to the list, so users can move the form elements up or down to indicate which order the teams will finish in, and the jquery below determines what order the user has placed them in.  However, I also create an input field for each of the list elements, so that users can enter in the number of points each team will get. </p>
  
  <p>For example, a user might move Winnipeg to the top of the list, and enter the value 95 in the input field. Therefore, Winnipeg would be first and finish with 95 points (according to the user's prediction of team standings).</p>
  
  <p>My question is, how do I access the input value for each of the form elements in such a way that they are associated with the team. For example, if Winnipeg is placed first, it will, according to the code below, be accessible at <code>result[0]</code> of the array. However, I don't think the input values are part of the array, so I don't know how to access them. </p>
  
  <p>I was able to access the first team using  <code>attribute.first</code>, but couldn't get the points doing <code>attribute.first.child</code> even though the input value seems to look like a child element.</p>
  
  <p>I ultimately want to be able to save each team to the database with their position number (determined by sort position) and points (determined by user manual input)</p>
  
  <pre><code>html
  
  &lt;form&lt;form id="new_entry"&gt;
  &lt;ul id="sortlist"&gt;
  
          &lt;li id="Vancouver"&gt;Canucks&lt;input type="text" name="name" id="vanpoints"&gt;&lt;/li&gt;
          &lt;li id="Toronto"&gt;Toronto&lt;input type="text" name="name" id="torontopoints"&gt;&lt;/li&gt;
          &lt;li id="Montreal"&gt;Montreal&lt;input type="text" name="name" id="montrealpoints"&gt;&lt;/li&gt;
          &lt;li id="Ottawa"&gt;Ottawa&lt;input type="text" name="name" id="ottawapoints"&gt;&lt;/li&gt;
          &lt;li id="Calgary"&gt;Calgary&lt;input type="text" name="name" id="calgarypoints"&gt;&lt;/li&gt;
          &lt;li id="Edmonton"&gt;Edmonton&lt;input type="text" name="name" id="edmontonpoints"&gt;&lt;/li&gt;
          &lt;li id="Winnipeg"&gt;Winnipeg&lt;input type="text" name="name" id="winnipegpoints"&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;input type="submit" value="Add"&gt;
  &lt;/form&gt;​
  </code></pre>
  
  <p>code</p>
  
  <pre><code>$("#sortlist").sortable({
      stop: function(event, ui) {
          result = $("#sortlist").sortable("toArray");
          var attributes;
          attributes = {
              first: result[0],
              second: result[1],
              third: result[2],
              fourth: result[3],
              fifth: result[4],
              six: result[5],
              seventh: result[6]
  
          };
  
          alert(attributes.first.child);
  
  
  
      }
  });​
  </code></pre>