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

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -