Generating inline JavaScript in HTML has always made me feel dirty and after having used YUI a bit I get the sense that it's best to leverage HTML elements as an alternative. Would it be insane to use a hidden <ul> to store keys and values to be used by static JavaScript which would only act when it found the <ul> rather than using inline JavaScript?
What practices are common out there and what practices have the most merit with regards to avoiding inline JavaScript?