Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery Mobile disable enhancement on certain tags?

I don't want the styles for the <a> tag. I've found threads like this How to "turn off" jQuery Mobile's styling of <select> drop downs? but I don't want to be adding data-enhance=false to every anchor I have. I was also hoping linkBindingEnabled would work (from http://jquerymobile.com/demos/1.2.0/docs/api/globalconfig.html), as in it wouldn't add custom classes to the <a> tag.

I could delete the definitions in the CSS file, but I'd prefer a programmatic way to do it. For example, I comment out .ui-body-c .ui-link (the default link), but then my links in the footer are still enhanced. And I'm sure there are other little cases, and I don't want to make it messy (although sometimes that's the only option)

Basically, is there a way to disable enhancement for a "selector" of elements? Instead of manually adding data-enhance=false

like image 965
Raekye Avatar asked Sep 07 '25 22:09

Raekye


1 Answers

To disable enhancement of a select component you can add data-role='none', tested on jQuery Mobile 1.4.2.

see http://jsfiddle.net/zLZzA/1/

like image 54
staabm Avatar answered Sep 10 '25 02:09

staabm