title: Targeting second child of li element in jQuery conditional statement
body: <p>I am having an issue where I can't seem to target a <code>2nd</code> child of an <code>li</code> element and use it in a conditional statement. Do the jQuery conditionals not work with <code>li:nth-child(2)</code>?</p>
  
  <pre><code>if($(".steps ul li:first-child").attr('aria-selected') == "true") {
      $( ".steps ul li:first-child" ).append( "&lt;div class='step-img'&gt;&lt;img src='../images/step1.png' alt='Step 1'&gt;&lt;/div&gt;" );
  }
  if(".steps ul li:nth-child(2)").hasClass(".current")) {
      $( ".steps ul li:nth-child(2)" ).append( "&lt;div class='step-img'&gt;&lt;img src='../images/step2.png' alt='Step 2'&gt;&lt;/div&gt;" );
  }
  </code></pre>