Skip to main content

Search and Top Navigation

#7237 closed bug (notabug)

Opened April 11, 2011 02:46PM UTC

Closed April 11, 2011 02:47PM UTC

Last modified April 11, 2011 05:14PM UTC

UI Buttons lack custom css class option. Prevents styling per-button action.

Reported by: harking Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.button Version: 1.8.11
Keywords: Cc:
Blocked by: Blocking:
Description

I couldn't find a way to add a css class to a button. Needed to provide custom styling to each button depending on action (Confirm: green, Cancel: red)

Attachments (0)
Change History (5)

Changed April 11, 2011 02:47PM UTC by scottgonzalez comment:1

resolution: → invalid
status: newclosed

That's what .addClass() is for.

Changed April 11, 2011 04:49PM UTC by harking comment:2

My motivation was to be able to set a class on a button when creating a dialog via http://jqueryui.com/demos/dialog/#option-buttons

Do you know of another way I can set the class on those?

Would a better patch be to modify dialog() so that it can take a class option when creating the buttons?

Changed April 11, 2011 04:56PM UTC by scottgonzalez comment:3

Changed April 11, 2011 05:04PM UTC by harking comment:4

Thanks!

Documentation was a vague that extra keys in the options for buttons would be added to the attributes of the button.

I'd love to update them but I couldn't find where to edit the docs or submit a patch for them. Links from http://jqueryui.com/development didn't direct me to contributing.

Changed April 11, 2011 05:14PM UTC by scottgonzalez comment:5

Documentation is locked down due to spam issues. Feel free to file a ticket to improve the documentation and include your proposed text. I, or someone else with access, can apply your change.

Thanks.