-1

I'm trying to: http://jsfiddle.net/2phuW/12/

if ( //if target is filled with items) {
 //dosomething
}

But I can't get the logic to work it out.

tshepang
  • 12,111
  • 21
  • 91
  • 136
user2376068
  • 207
  • 1
  • 4
  • 11

1 Answers1

0

Try this:- For now i am running an alert if it gets filled up.

I am just checking for the condition here to see if all slots are filled in.

$('.ui-droppable').find('span.closer').length == $('.ui-droppable').length


  if ($('.ui-droppable').find('span.closer').length == $('.ui-droppable').length) {
     alert('Listo ahora puedes simularlo');
     //if target is filled
     $(".status1").replaceWith('<i class="icon-check"></i> Listo ahora puedes simularlo'); //update status
      //put composition into params
   } else {
        $(".status1").replaceWith('<i class="icon-edit"></i> Sigue');
   }

Demo

PSL
  • 123,204
  • 21
  • 253
  • 243