I believe I'm interpreting your question correctly, but correct me if I'm wrong: you're asking how jQuery mobile applies classes to elements when you use it (or perhaps why). Similar to jQuery UI, mobile works under the premise that a user (developer) structures their document using component or layout markup that we support for defining a base to be later 'enhanced' via JavaScript (ie. jQuery UI/Mobile). When jQuery mobile is loaded (or manually 'applied') it enhances this markup using both CSS classes specific to those that come with jQuery mobile (so, the mobile theme you're used to seeing) and also takes care of applying the behaviour required to get things working. You could look through the jQuery mobile source to find out how these classes are added, but in a lot of cases it's either going to be using jQuery's addClass() or directly injecting further sub-markup to your element markup containing CSS class names which can later be themed. It's not a terribly difficult process to break down, but thats the gist of it.