You might want to check out some extremely lightweight Javascript libraries such as xui, zepto, or jQuery Mobile. However, 17KB should not be a huge concern on iOS and Android devices. On phones with minimal web browsing speed and capabilities, you could launch a separate site at m.example.com or mobile.example.com with minimal CSS, small page size, and no Javascript at all.