Comment Re:To be fair... (Score 1) 405
Comment Re:Such a Waste (Score 1) 156
Comment Re:Yes there was. (Score 4, Funny) 187
If I was looking for nits to pick, I could greater nit than this.
How many nits could a nit picker pick, if a nit picker could pick nits?
Comment Re:Business vs Open Source (Score 1) 408
Comment The pitfalls of sharecropping (Score 1) 716
Comment Re:So Where Exactly is this 'Leaked' Document? (Score 1) 775
America is only a subset of humanity.
I originally read that as "America is a set of subhumanity", which seemed a bit harsh.
Comment Re:My Kingdom for a Datagrid Element! (Score 1) 541
When's the last time you laid out a site without a table element on every page?
Thursday. I was off sick yesterday.
"Oh, I want this box to highlight red when this happens!" a user might say.
Custom Events are your friend, and a sound basis for designing any complicated user-interface or series of interactions: http://developer.yahoo.com/yui/examples/event/custom-event.html So your problem above boils down to:
YAHOO.util.Event.on(thisBox, thisHappened, updateBox)
- thisBox being a DOM reference to your table cell
- thisHappened being the custom event you've defined as "this happens"
- updateBox being the function or method that probably just adds a class name to the table cell, letting the CSS apply the necessary style changes
Another good writeup of custom events is: http://nefariousdesigns.co.uk/archive/2007/07/ajaxevent-using-yui-custom-events-with-ajax/
Comment Take control of your brand (Score 2, Informative) 474
Comment The Infocom game online (Score 1) 338
Tim Bray on the Birth of XML, 10 Years Later 260
Comment Re:More than one side to this one... (Score 5, Informative) 210
Then there's Digg; Digg's pages are such a load on the visitor's CPU that I have to click "script not responding, continue?" three times on a page with 800 or so comments with Firefox and a dual-core 2 GHz CPU just to get the page to completely render.
Sounds like Digg is attaching events to every show/hide link instead of using event delegation and using only one event listener. Browsers can't really handle hundreds of attached event listeners, it is a known performance issue.
Now using event delegation instead of attaching hundreds of events should definitely be in a set of web development best practices.
Tech Magazine Loses June Issue, No Backup 245