Hello Kevin,
You can achieve this by dynamically adding/removing the k-i-pin and k-i-unpin classes e.g.
The problem will occur with the code that you provided because when initializing a new button, the previous icon class will not be removed.
Regards,
Daniel
Telerik
You can achieve this by dynamically adding/removing the k-i-pin and k-i-unpin classes e.g.
$("#button").kendoButton({ icon: "pin", click: function (e) { $('.UserFavouritesPanel').animate({ width: 'toggle' }, 350); var icon = this.element.children(".k-icon"); if ($('.UserFavouritesPanel').width()>1) { icon.removeClass("k-i-pin"); icon.addClass("k-i-unpin"); } else { icon.removeClass("k-i-unpin"); icon.addClass("k-i-pin"); } }});Regards,
Daniel
Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items