I no longer use anonymous functions because my understanding of JavaScript jumped to a new plateau when I started naming them. And, in addition, naming your functions provides a kind of built-in documentation:
$('.more').click(myFunction)
function myFunction() {
if (condition1) {
if (condition2) {
return
}
}
}
source
share