title: Add element if LI has children
body: <p>looking for a way in jQuery to add a little down arrow to each navigation item that has children li's.</p>
  
  <p>So markup of nav is:</p>
  
  <pre><code>&lt;div class="mainNav"&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href=""&gt;Nav One&lt;/a&gt;
  &lt;ul&gt;
      &lt;li&gt;&lt;a href=""&gt;Sub nav 1&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=""&gt;Sub nav 2&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=""&gt;Nav Two&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So - after the Nav One I am looking to inject a line of code - i class='arrow down' as per code below</p>
  
  <p>I was hoping this would work in jQuery - but it does not... what am I doing wrong? I cant see to target the  to insertAfter it?</p>
  
  <pre><code>$('.mainNav ul li').has('ul').children("a").insertAfter("&lt;i class='arrow down'&gt;&lt;/i&gt;")
  </code></pre>