I have multiple switches on a page, each switch has the same class assigned to it.
What i need is that if any switch is checked / changed i need an event to fire and also need to check the state of the remaining switches.
@(Html.Kendo()
.SwitchFor(a => a.IsAdmin)
.HtmlAttributes(new { @class = ".permissions" })
.Messages(c => c.Checked("YES").Unchecked("NO")))
I have tried numerous jquery approaches but none of them even fire when the switch is toggled.
$('body').on('change', '.permissions', function () {
// this event handler never gets trigged.....
// get an instance of each switch and get the toggled / checked state.
alert();
});