A discussion today led to me sending out an email to all the developers at work today, which given the amount of campaigning for jQuery I've done at the company, I had hoped would'nt have been necessary. But it was.
Basically a co-worker had asked me for some assistance with some HTML/CSS. Unfortunately this led to me looking at his code and discovering an abundance of javascript events specified directly within the HTML.
<div id="MyElement" onclick="javascript: myFunction();">Click Me!</div>
As I mention, we've adopted jQuery quite widely throughout our products, so I pointed out that it would be much easier for everyone to follow, and easier to take advantage of jQuery's special events and event delegation functions if the events were bound in the $(document).ready() function for that page. What's more, we know the separating style and markup is important, keeping javascript and the markup separate is also important. By keeping them apart it makes it easier to split the javascript off into a separate file (much easier to minify AND it's cached!).
So as I say this is just a quick blog post in case anyone else is unsure about where the best place to specify javascript events are. In my opinion, not the HTML!