"Pro CSS and HTML Design Patterns" uses several JavaScript Frameworks. One best practice for using JavaScript with CSS is to use JavaScript to modify the class attributes of an element to dynamically change how the element is styled. This is the best way for JavaScript to modify the style of an element: CSS defines the style through a class and JavaScript dynamically assigns classes to elements.
I wrote a framework that does this. It is included with my book. You can download it at
http://cssdesignpatterns.com Internally this framework uses the Yahoo event library which unifies event handling across the different browsers.
http://developer.yahoo.com/yui/event/ As a complement to the best practice of using JavaScript to modify only the class attributes of elements, my book advocates selecting XHTML elements in JavaScript using the CSS selector syntax. This approach allows you to use the same CSS selectors to select elements in CSS and in JavaScript. Using the same selector syntax makes CSS and JavaScript code more intuitive and more maintainable. Check out Chapter 17 of my book. This is really cool!
To select elements in JavaScript using CSS selector syntax, you need a JavaScript library. My framework uses the cssQuery library created by Dean Edwards at
http://dean.edwards.name/my/cssQuery/ Lastly, I show you in the book how to use JavaScript without inserting a single line of JavaScript into the body of an HTML document! This is really cool stuff and makes for a very clean separation of design (CSS), structure (XHTML), and interaction (JavaScript)!