title: Jquery prev appending to many elements
body: <p>I have a listview that outputs as a table. Inside of each <code>&lt;td&gt;</code> I have a <code>&lt;div&gt;</code> which contains a <code>&lt;hidden&gt;</code> element. </p>
  
  <p>When a sibling of that element is clicked I have it read the hidden value of the <code>hidden</code> element with <code>jquery.prev()</code>. </p>
  
  <p>It does the first element fine,  but when I click on another element it appends the first element i click orginally. Right now i am testing so i have a <code>alert</code> call the variable for testing and I get two alerts with the value of the <code>hidden</code> element the first one i clicked and now the second. this var continues to build. how do I just have prev get that one value?</p>
  
  <p>Here is my markup:</p>
  
  <pre><code>          &lt;div id="HypeShareAlbum" style="padding: 0;margin:0"&gt;
                &lt;input type="hidden" value="&lt;%#Eval("ID") %&gt;"/&gt;
                &lt;asp:HyperLink runat="server" Text="Share Album"&gt;&lt;/asp:HyperLink&gt;
            &lt;/div&gt;
  </code></pre>
  
  <p>And my corresponding client code:</p>
  
  <pre><code> $('#HypeShareAlbum a').click(function () {
              //Create/clear variiable for albumID
              var albumvalue = '';
              //Set Variable for albumid
              albumvalue = $(this).prev().val();
              //Dialog Settings
              var dialogsettings = {
                  width: 447,
                  minheight: 100,
                  height: 356,
                  position: ["center"],
                  close: function () {
                      $('#ClonedEmail').html('');
                  }
              };
              //DIALOG FOR SHARING ALBUM STARTS HERE
              //Show Share Album Dialog
              $('#ShareDialog').dialog(dialogsettings);
              //When Focusing out of main email check if exist
              $('#addemail input[type=text]').focusout(function () {
                  //Checks main email
              });
              //Click Event for Adding more Emails to dialog
              $('#AddMoreEmails').click(function () {
                  //Append Email
                  $('#addemail').clone().appendTo($('#ClonedEmail'));
                  //Remove and bind back fousout event
                  $('#ClonedEmail input[type=text]').unbind('focusout');
                  $('#ClonedEmail input[type=text]').focusout(function () {
                      //Check email and let user no if email is found or not
                  });
              });
              //Cancel Dialog
              $('#CancelEmailShare').click(function () {
                  $("#ShareDialog").dialog("close");
              });
              //Send Email Ajax and Cancel Dialog
              $('#SendEmailShare').click(function () {
                  alert(albumvalue);
              });
              //DIALOG FOR SHARING ALBUM ENDS HERE
          });
  </code></pre>