如何在uniform(jquery)中保留一些输入元素并提交无样式的按钮?

发布于 2024-10-06 17:24:41 字数 265 浏览 0 评论 0原文

Uniform 是一个表单样式插件。 我在我的新网站上使用这个。这真的很好并且工作完美,但是我有一个网站搜索,我想在其中放置我自己的 css 样式。 我如何让这些字段不被统一样式化,以便它们可以被CSS样式化。 ???

请帮忙../


通过类似的方法解决了这个问题

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

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();
});

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

櫻之舞 2024-10-13 17:24:42

将其添加到页面

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

从页面动态删除 css

<link id="uniformCss" type="text/css" rel="stylesheet" href="stylesheets/uniform.default.css" /> 
<script>
$('#uniformCss').delete();
</script>

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>
岁吢 2024-10-13 17:24:41

我遇到了这个问题并找到了更新的答案。

来自 https://github.com/pixelmatrix/uniform

如果你想“不统一”某些东西,只需调用此函数即可。它
将删除内联样式、额外的 dom 元素和事件处理程序,
有效地将元素恢复到之前的状态。

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

// e.g.
$.uniform.restore("#something");

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");
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文