当前位置: 动力学知识库 > 问答 > 编程问答 >

forms - How to leave some input elements and submit buttons unstyled in uniform(jquery)??

问题描述:

Uniform is a form styling plugin.

I am using this on my new website. This is really good and working perfect but I have a site search where I want to put my own css style.

How do I leave those fields unstyled by uniform so they can be styled by css. ???

Please help../


Solved it by something like

 $(function(){

$("input, input:file, select, checkbox").uniform();

});

网友答案:

I came across this question and found an updated answer.

From https://github.com/pixelmatrix/uniform

If you want to “un-uniform” something, simply call this function. It will remove the inline styles, extra dom elements, and event handlers, effectively restoring the element to it’s previous state.

$.uniform.restore([elem/selector string]);

// e.g.
$.uniform.restore("#something");
网友答案:

add this to page

<style>
input, select, button { // name the appropriate selectors
    border: auto;
    background: auto;
    color: auto;
    position: auto;
}
</style>

or

dynamically remove css from page

<link id="uniformCss" type="text/css" rel="stylesheet" href="stylesheets/uniform.default.css" /> 
<script>
$('#uniformCss').delete();
</script>
分享给朋友:
您可能感兴趣的文章:
随机阅读: