It is not possible to detect capslock on all smartphones using HTML/JavaScript/jQuery. In fact, taking this further, it is worth mentioning that in fact it is not possible to reliably detect any specific keypresses for all smartphones using only HTML/JavaScript/jQuery. For example, the Google Chrome browser for Android (not necessarily the native Android browser) has a bug where it returns a keypress code of 0, no matter the key being pressed. Perhaps this will be resolved one day but it's been present since the first version, which is getting on for a couple of years.
Perhaps if you're targetting a specific collection of browsers/smart phones this is less of an issue for you. e.g. Sticking to stock iOS, Windows Phone 8 and Android browsers, but its really worth mentioning that there is no magic bullet solution that covers all of them.
If you're developing a hybrid application rather than a web site, such as with PhoneGap, you have the option to use a native plug-in to capture the keypresses and hand off to PhoneGap so you can consume in JavaScript/jQuery.