0

I'm using jQuery UI with a custom theme, and I have an <input type="submit"> element on my page. Since jQuery is around this button gets the jQuery UI look and feel - it is automagically added the css classes ui-button ui-widget ui-state-default.

How do I get rid of these ? Want the button to be a plain old button without those classes.

Thanks.

0

3 Answers 3

2

The buttons don't automatically get the classes set - you must be calling something like the following

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

you need to remove input:submit

Sign up to request clarification or add additional context in comments.

1 Comment

You are correct, that was indeed the case. Thx. StackOverflow is da bomb.
2

To change your button back to 'normal' style you could either use ManseUK's answer,
or if you just want to restyle this button you can remove the three classes by adding

$("#yourButtonID").removeClass("ui-button ui-widget ui-state-default")

Comments

0

Another way to solve this problem is that if you look in the jquery-ui.js file there will be a block comment that starts with something like: "jQuery-UI Button", delete that entire block from the start of the comment to the start of the next comment for another widget.

This solved the problem for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.