Using Jquery 1.8.0 return false is not breaking an each() loop
- by user1879729
Here is the script I am using.
$('.row').each(function(){
$(this).each(function(){
if($(this).find('.name').val()==""){
$(this).find('.name').val(data.name);
$(this).find('.autonomy').val(data.autonomy);
$(this).find('.purpose').val(data.purpose);
$(this).find('.flow').val(data.flow);
$(this).find('.relatedness').val(data.relatedness);
$(this).find('.challenge').val(data.challenge);
$(this).find('.mastery').val(data.mastery);
$(this).find('.colour').val(data.colour);
done=true;
}
if(done==true){
alert("here");
return false;
}
});
});
It just seems to totally ignore the return false and I can't seem to work out why!