Getting things right vs. Getting things done
January 2, 2008
Most of today’s web developer will tell you that
the following:
<h2 id=”foo”>Click Here</h2>
<script>
$(’foo’).click = function(){alert(”Hello”)};
</script>
is better than:
<h2 id=”foo” onclick=”alert(’Hello’);”>Click Here</h2>
and the following:
<style>
body{
background-color:#ffffff;
color:#000000;
margin-top:3}
a{color:#0000cc}
a:visited{color:#551a8b}
</style>
<body>….</body>
<script>
$(document).ready(function(){
sf();
if(document.images){
new Image().src=’/images/nav_logo3.png’;
[...]