by bdg · 14y ago · 0 comments
WHAT?
No, you do NOT mix JavaScript into your HTML elements. Total disregard for separation of concerns, maintainability nightmares abound.
You put script, surprisingly, into the <script> tag.
<a href="/posts/1244/comments/new" onclick="Comment.new(this); return false;">New Comment</a>2. Violates separation of concerns
3. Complicates maintainability
4. Events are bound directly to elements rather than bubbling and being managed via delegation.
onclick="return vote(this)"[edit] my point was to not take this site as an example of best-practices...
I have found that when you're looking for JS help or references, you should use the most recent available.