Gracefully degrade to JS-only site in sub-A-grade browsers?

Gracefully degrade to JS-only site in sub-A-grade browsers?

Firstly, I love jQuery Mobile. 

Secondly, sorry if this question has been asked before, but I couldn't find it if so!

I would like to use jQuery Mobile *only* in A-grade browsers, and degrade gracefully to a JavaScript-only site in other browsers. In other words, not load the jQuery Mobile CSS or JS at all in other browsers. 

What is the recommended way to achieve this? 

Bonus points for actual code :) 

Thanks.