Rule Definition
Avoid use of anonymous functions to attach events. Anonymous functions are difficult to debug, maintain, test, or reuse
Remediation
Use explicit function name
Violation Code Sample
$("#myLink").on("click", function(){...}); // BAD
Fixed Code Sample
function myLinkClickHandler(){...} $("#myLink").on("click", myLinkClickHandler); // GOOD
Reference
http://learn.jquery.com/code-organization/beware-anonymous-functions/
Related Technologies
HTML5
Technical Criterion
Architecture - Reuse
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.