Hi There,
i have the following code. I'm wanitng the icon of the button to change eveytime you click the button deppening if the panel has expaneded or not. ("pin" and "unpin").
$("#button").kendoButton({
icon: "pin",
click: function (e) {
$('.UserFavouritesPanel').animate({ width: 'toggle' }, 350);
if ($('.UserFavouritesPanel').width()>1) {
$("#button").kendoButton({
icon: "unpin"
});
} else {
$(".UserFavouritesViewBtn").kendoButton({
icon: "pin"
});
}
}
});
The issue im having is that on the fist click the icon changes to the correct one but after that when you click the button it never changes again until you refresh the screen. Any ideas on why this happens.