本文介绍了jQueryUI-悬停时删除类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JSFiddle 此处.我已经成功删除了jqueryUI应用于按钮的CSS,除非将其悬停超过.如果将鼠标悬停在Fiddle上的按钮上,您会看到什么对我来说很吸引人的灰色边框和背景(对我而言).

JSFiddle here. I've successfully removed the CSS applied by jqueryUI to my button except when it's being hovered over. If you hover over the button on the Fiddle, you'll see what is (to me) an unattractive grey border and background that I'd like to get rid of.

我尝试过的事情:

$( "input[type=image]" ).button().removeClass("ui-state-default");
$( "input[type=image]" ).button().hover().removeClass("ui-state-hover");

$("input[type=image]").button().removeClass("ui-state-default ui-state-hover")

均无效.

请提出建议?

推荐答案

只需在jQuery UI CSS之后加载您自己的CSS即可覆盖它:

Just override it with your own CSS loaded after the jQuery UI CSS:

.ui-state-hover {
    background:none;
    border:none;
}

jsFiddle示例

jsFiddle example

这篇关于jQueryUI-悬停时删除类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 01:59