title: calling jquery replace content does not works when inside of function
body: <p>so Im trying to: <a href="http://jsfiddle.net/LdeGC/1/" rel="nofollow">http://jsfiddle.net/LdeGC/1/</a></p>
  
  <pre><code>            if ($('.ui-droppable').find('span.closer').length == $('.ui-droppable').length) {
                  alert('Listo ahora puedes simularlo');
                  //if target is filled
                      $(".status1").replaceWith('&lt;i class="icon-check"&gt;&lt;/i&gt; Listo ahora puedes simularlo'); //update status
                  //put composition into params
              } else {
                  $(".status1").replaceWith('&lt;i class="icon-edit"&gt;&lt;/i&gt; Sigue');
              }
  </code></pre>
  
  <p>the alert works, but the jquery replaceWith inside the if does not, how can i fix it?</p>