title: How to alert if addClass is successful?
body: <p>How can I make an alert with the message "it worked" if an addClass() was sucessful? This is what the addClass() code looks like:</p>
  
  <pre><code>$( "li.selected" ).children("ul").addClass( "childUL" );
  </code></pre>
  
  <p>The reason for this is to add a class of "childUL" for every ul on lower levels of an li.selected, it coul'd look like this for example or totally different.:</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt;
      &lt;ul&gt;
        &lt;li class="selected"&gt;
          &lt;ul&gt;
            &lt;li&gt;
              &lt;ul&gt;
                &lt;li&gt;
                &lt;/li&gt;
              &lt;/ul&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
        &lt;li&gt;
          &lt;ul&gt;
            &lt;li&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;/li&gt;
      &lt;/ul&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>In this example: <a href="http://jsfiddle.net/4EbLu/27/" rel="nofollow">http://jsfiddle.net/4EbLu/27/</a> Zlatan Ibrahimovic isn't colored green. Maybe this will clearify my question.</p>
  
  <p>Cheers / Robin.</p>