I am tring to loop loop a jQuery command 5 times. Here is my code:
for(var i = 0; i < 5; i++) {
$("#droppable_"+i).droppable({
activeClass: 'ui-state-hover',
hoverClass: 'ui-state-active',
drop: function(event, ui) {
$(this).addClass('ui-state-highlight').find('p').html('Dropped!');
}
});
}
For some reason I can't get it to work. Can someone help me please?