This is a migrated thread and some comments may be shown as answers.

Class attribute on splitButton

1 Answer 189 Views
Toolbar
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 2
Iron
Jack asked on 08 Dec 2014, 05:12 PM
See http://dojo.telerik.com/OcEWe
IMHO, the k-primary class should also have been applied to the down arrow part of the splitButton.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 10 Dec 2014, 12:49 PM
Hello Jack,

Your request makes sense in this case, but there are scenarios in which the desired behavior will cause side effects, for example if you set a width style via the button's attributes, it will be applied to the arrow element as well, which is not needed.

I recommend you to add the k-primary class to the arrow element with Javascript after the Toolbar is initialized:

$(".k-split-button > .k-primary + .k-split-button-arrow").addClass("k-primary");

On the other hand, CSS styles that need to be targeted at the whole split button (i.e. the split button's wrapper), can be applied via the buttons ID, e.g. #user-toolbar-view.

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Toolbar
Asked by
Jack
Top achievements
Rank 2
Iron
Answers by
Dimo
Telerik team
Share this question
or