How to append an element with jQuery unless it exists already?
<p>I have this jQuery function that appends a <code>span</code> labelled "optional" to a label if no option is set in the select box.</p>

<pre><code>function setLabel() {
    var label=$('label[for=person_address]');
    if ($('select#person_organisation_id').val().length != 0) {
      label.append(' &lt;span&gt;— optional&lt;/span&gt;');     
    } else {
  label.children().remove();            
  } 
}
</code></pre>

<p>Right now this adds a new span to the label every time I select a new option. How can I check if a span already exists and only add a span if there is none already?</p>

<p>Thanks for any help...</p>
