Reputation: 285
I am trying to change the editor button (save, cancel) css in Slickgrid. How do I apply a css class to the button item as shown below?
<body>
<div><button>save</button></div>
</body>
I tried to bind the cell double click event to this code:
$("body button").addClass("custom_button");
It was not working because:
Thanks in advance!
EDIT:
Upvotes: 0
Views: 531
Reputation: 4251
If you want to style all buttons in the body, you can just use CSS. Put the style from your custom_button
class in a CSS selector, put something like this in the head
of your page:
<style type="text/css">
body button {
/* styles from custom_button class go here */
}
</style>
Upvotes: 0
Reputation: 156
Give the button an id.
<button id="saveButton">save</button>
That way you can call it directly
$("saveButton").addClass("custom_button");
Upvotes: 0