The problem with mobile devices vs. traditional browsers is that... well, what's the difference?
There are desktops out there with slower connections than your cell phone. There are cell phones with higher resolutions with desktops. And then, of course, the reverse is also true.
Ideally, you should consider making your site in such a way that it works well on both. While in practice, this is often difficult, I think these days that you'll find your efforts worth it. Your users will love you for it too.
If you still feel the need to attempt this... especially in JavaScript... see this post: Mobile detection