title: How to change visibility of item using jQuery?
body: <p>My application requires that users upload a set of required documents (Upload #1, Upload #2, Upload #3).  When an upload completes, it returns the requirement identifier (req_id).  </p>
  
  <p>The page displays a list of the requirements, and currently changes the class from "missing" to "complete" once a particular item is uploaded.  However, I'd also like to change the visibility of a "delete" icon from hidden to visible once the upload is complete as well.</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li class="missing" rel="1"&gt;
          &lt;span class="link"&gt;
              &lt;a href="#" target="_blank"&gt;Upload #1&lt;/a&gt;
          &lt;/span&gt;
          &lt;span class="controls"&gt;
              &lt;img src="download.png" class="download" &lt;? if ($req_item['class'] == "missing") { echo 'style="visibility: hidden;"'; } ?&gt; &gt;        
              &lt;img src="trash.png" class="delete" &lt;? if ($req_item['class'] == "missing") { echo 'style="visibility: hidden;"'; } ?&gt; &gt; 
          &lt;/span&gt;
      &lt;/li&gt;
      &lt;li class="missing" rel="2"&gt;
          &lt;span class="link"&gt;
              &lt;a href="#" target="_blank"&gt;Upload #2&lt;/a&gt;
          &lt;/span&gt;
          &lt;span class="controls"&gt;
              &lt;img src="download.png" class="download" &lt;? if ($req_item['class'] == "missing") { echo 'style="visibility: hidden;"'; } ?&gt; &gt;        
              &lt;img src="trash.png" class="delete" &lt;? if ($req_item['class'] == "missing") { echo 'style="visibility: hidden;"'; } ?&gt; &gt; 
          &lt;/span&gt;
      &lt;/li&gt;
      &lt;li class="missing" rel="3"&gt;
          &lt;span class="link"&gt;
              &lt;a href="#" target="_blank"&gt;Upload #3&lt;/a&gt;
          &lt;/span&gt;
          &lt;span class="controls"&gt;
              &lt;img src="download.png" class="download" &lt;? if ($req_item['class'] == "missing") { echo 'style="visibility: hidden;"'; } ?&gt; &gt;        
              &lt;img src="trash.png" class="delete" &lt;? if ($req_item['class'] == "missing") { echo 'style="visibility: hidden;"'; } ?&gt; &gt; 
          &lt;/span&gt;
      &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>function stopUpload(success, req_id){
  
      if (success == 1){
          $('#upload_result').html('&lt;span class="msg"&gt;Success!&lt;\/span&gt;');
          $("ul li[rel=" + req_id + "]").removeClass().addClass('complete')
          $("ul li[rel=" + req_id + "]").child('.controls').child('.delete').css('visibility','visible')
      }
      else {
          $('#upload_result', window.parent.document).html(
          '&lt;span class="emsg"&gt;Error!&lt;\/span&gt;');
      }
      $('#upload_progress').hide();
      return true;
  
  }
  </code></pre>