I am using jQuery UI from a theme-based library.
Having links made as buttons is fine, however I need to redefine some buttons with different colors.
How to specify a specific class for a specific button?
I would say give a specific button or buttons an identifier and:
$("#buttonId").removeClass().addClass("myClass");
If you want to apply it to multiple buttons, each with its own id:
$("#buttonId, #anotherButton").removeClass().addClass("myClass");
CSS jQuery CSS, , , jQuery UI. , CSS, CSS- jQuery. CSS , , . , , CSS, jQuery, CSS .
Smashing Magazine , , , , .
:
, jQuery UI spinner , , Chrome Dev. CSS: - :
.<jquery-ui-class-that-i-found> { border: 0px !important; }
!
, API , ..,
$("button").button({background:"FFFFFF",hover:"FFFFF"});
, .
, : $ ( "BtnSave." ) RemoveClass ( "- " ) addClass ( "SaveButtonStyling" );..
ui-state-default, ..
Thsi , .. , ..
/ , , class= "mybuttonclass otherbuttonclass" - . css ()
.mybuttonclass { background-color: red; } .otherbuttonclass { color:white; }
, - , , (CSS) . (, .CSS jQuery jQuery jQuery , jQuery UI css.