draggable - calling jquery replace content does not works when inside of function -
so im trying to: http://jsfiddle.net/ldegc/1/
if ($('.ui-droppable').find('span.closer').length == $('.ui-droppable').length) { alert('listo ahora puedes simularlo'); //if target filled $(".status1").replacewith('<i class="icon-check"></i> listo ahora puedes simularlo'); //update status //put composition params } else { $(".status1").replacewith('<i class="icon-edit"></i> sigue'); }
the alert works, jquery replacewith inside if not, how can fix it?
try html
instead of replacewith
.
try below
if ($('.ui-droppable').find('span.closer').length == $('.ui-droppable').length) { alert('listo ahora puedes simularlo'); //if target filled $(".status1").html('<i class="icon-check"></i> listo ahora puedes simularlo'); //update status //put composition params } else { $(".status1").html('<i class="icon-edit"></i> sigue'); }
Comments
Post a Comment