add comment clarifying "return false" in "$.each" acts as a "break" - not obvious to those less familiar with jQuery
This commit is contained in:
parent
9b4eaaf4e8
commit
dcd88cd502
@ -70,7 +70,7 @@ window.runHooks = function(event, data) {
|
|||||||
$.each(_hooks[event], function(ind, callback) {
|
$.each(_hooks[event], function(ind, callback) {
|
||||||
if (callback(data) === false) {
|
if (callback(data) === false) {
|
||||||
interupted = true;
|
interupted = true;
|
||||||
return false;
|
return false; //break from $.each
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return !interupted;
|
return !interupted;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user