开发者

Should jQueryUI apply styles automatically

I've created a theme and applied it to my ASP.NET MVC site. However, the elements on the page aren't picking up the styles automatically. If I do the following for a specific element they get applied appropriately:

$("input[type=button]").button();
$("input[type=submit]").button();

Am I right in thinking I need to do this for all the different elements? Perhaps incorrectly, I assumed this would be done auto开发者_如何学Gomatically by referencing the css and custom js files?

Thanks


you can write :submit instead of input[type=submit], but I know that's no the answer of your question.

The jQuery UI library only provides code to style your website, but it doesn't do it automatically. So what you need to do is something like this:

$(":submit, :button, :reset").button();

But sometimes you want to use icons or something like this, then you can use

$("#specificButton").button("option", "...", "...");

I hope it helps!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜