Building Smartphone-Optimized Websites
One part of building smartphone-optimized sites that requires careful consideration is the use of JavaScript to alter the rendering and behavior of the site on different devices. Typical uses of JavaScript include deciding which ad or which image resolution variant to show in the page.This page describes different approaches to using JavaScript and how they relate to Google's recommendation of using responsive web design.
An excerpt from Building Smartphone-Optimized Websites