Reputation: 355
I've just started using Jquery UI for a new project.
I've uploaded the example code from the download I was given, and out of the box the buttons didn't work. I looked into the code, and saw that there was no call to the button() method.
I added a call in, but it still doesn't want to style the buttons for me. I've tried reducing it down to just the buttons, and still nothing. Same in IE9, Chrome 20 and FF.
I've uploaded a demo to http://www.boys-brigade.org.uk/buttondemo/index.html
For this, I've left in the tabs demo too, so I can quickly see that Jquery UI itself is loading. The CSS and JS are all present, and I can see mention of "button" in the code for each.
Really wanted to make use of Jquery UI in this project, but after hitting a problem at the very first step, I'm not sure it's going to work out.
Upvotes: 2
Views: 1955
Reputation: 21050
You're misssing a div with a class of 'demo' around your button. You've copied the jQuery call from the demo page on the jQuery site and that's what they have on there. This isn't needed but you'd just have to adjust your jQuery call accordingly I think.
The following should probably work with your HTML.
$("button").button();
Upvotes: 3
Reputation: 46060
I'm guessing:
$( "input:submit, a, button", ".demo" ).button();
Should be:
$( "input:submit, a, button, .demo" ).button();
Upvotes: 0