Friday, February 11, 2005

Suckerfish Dropdowns - HTML Dog

I've got a project coming up that will involve, if not full blown dropdown menus, at least a little bit of similar behavior. I really like the HTML Dog function, but PPK does have a point when he objects to using CSS for modern browsers and JavaScript for Internet Explorer in his article Separating Behavior and Presentation. If one is working and the other is not the whole thing falls to shit.

So it seems for my upcoming project it would make sense, since outside of my immediate team IE is the primary audience, to use a straight JavaScript approach. And the Suckerfish hover function might be just the right idea, although I'll have to write an initializing function and debate whether to apply a class or manipulate the CSS properties directly via JavaScript. I wonder which renders faster? I'm betting the JS, since it doesn't have to ponder the cascade, or precedence or anything.

No comments: