I usually do what I understand to be the reverse of what you are wanting to do. Using jQuery, I add the class of js to the html tag in the following way:
<script src="jquery-1.4.2.js" charset="utf-8"></script>
I know that scripts should only be loaded towards the end of your page, but I see no harm loading one script at this point, especially if it is minified or you are using a CDN and the rest of the scripts in the footer.
That way, you write your CSS in the usual way, and then only add the .js selector to the elements you want to be manipulated/affected by JS:
This is by far the best method to achieve this sort of thing out of any I have tried.
Hope it helps.