我正在使用jQuery的Themeroller为我的Web应用程序创建一个样式。我正在尝试将样式应用到我自己的自定义按钮。但是,ui-state-hover类未应用。
我在我的代码中添加了相同的类,我可以在Themerollers页面上看到该按钮组件。这是我从firebug复制的代码:
<button aria-disabled="false" role="button" class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only" id="button">
<span class="ui-button-text">Visa/Dölj filter</span>
</button>
我已经包含了jquery-ui-1.8.18.custom.css和jquery-1.7.1.min.js文件。
使用themerollers时我还需要考虑什么?
这是非常令人沮丧的,因为我认为这将开箱即用。如果这不起作用,我就无法使用它,因为使它工作比自己创建样式花费更多的时间......
答案 0 :(得分:1)
您无需尝试复制CSS类jQuery UI will add these for you。请尝试以下HTML:
<button id="button">Visa/Dölj filter</button>
和Javascript:
$(document).ready(function() {
$("#button").button();
}
您需要包含jquery-ui-1.8.18.custom.css,jquery-ui-1.8.18.custom.min.js和jquery-1.7.1.min.js