Would it be better to have jQuery Mobile styling for all tags be nested inside ui-body? I have some links that I do not want to look like JQuery Mobile but cant stop it. Is there a way to stop jQuery Mobile styling on links?

Replies(3)

jQuery Mobile only styles regular anchor links if you've explicitly told the framework to do so by adding the data-role="button" to your anchor tags. If you want a regular hyperlink that isn't styled by jQuery Mobile you just don't include that attribute and jQuery Mobile doesn't modify the anchor styling.

In the main content block of a page, you can style any anchor link as a button by adding the data-role="button" attribute. The framework will enhance the link with markup and classes to style the link as a button.

jQuery Mobile doesn't automatically convert all anchor/hyperlinks to buttons. So, if it's styling your anchor tags as jQuery Mobile buttons it's because you've told the framework to do so. jQuery Mobile does automatically enhance form input buttons, but again the framework provides the ability to control this behavior.

This is where it helps if you're specific about your problem or concern. jQuery Mobile doesn't convert your links to buttons automatically unless you tell it to as mentioned above. You didn't specify that you just don't want the other general document style specifications applied to the link.

It's CSS. It's not like jQuery Mobile is defining CSS in a manner that prevents defining your own preferred display style yourself. If you don't like the way an element is styled you're free to change the style definitions to whatever you want.