Disabling Twitter Bootstrap Styles on Forms like JQM

You can add data-role = "none" to form elements in jQuery Mobile if you just want to use the native styles http://jquerymobile.com/demos/1.2.0/docs/forms/forms-all-native.html

Is there a similar option for Twitter Bootstrap? Nothing seems to be found.

+3


source to share


1 answer


Not familiar with this structure, but when I go to the Custom page, you cannot include the Forms section in CSS: http://twitter.github.com/bootstrap/customize.html

This would mean that the form elements are styled with CSS only, and simply stripping them of their classes should allow you to disable the styling (which is shown here: http://twitter.github.com/bootstrap/base-css.html#forms ).

This framework seems to rely on classes versus added attributes like JQM. Deleting classes seems to be the best way to access it, and there doesn't seem to be an easy way to do it. However, you can mock the activity with JQuery. Something like the following:



$(function () {
    $("body").find("*[data-role='none']").attr("class", "");
});

      

This can be improved to store all the values โ€‹โ€‹of the class, and then just turn them off in relation to the struct.

+3


source







All Articles