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

Kendo switch change event using jquery

2 Answers 674 Views
Switch (Mobile)
This is a migrated thread and some comments may be shown as answers.
morteza
Top achievements
Rank 1
morteza asked on 27 Aug 2018, 05:21 PM

is there any way ,to get the Change event of kendo switch with jquery?i dont want to use kendo helper

<input type="checkbox" id="tst" aria-label="Notifications Switch" />
the following does not work:

$("#tst").change(function(){ alert("works");});

 

i

2 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 29 Aug 2018, 11:20 AM
Hello Morteza,

In order to handle the change event of the Switch widget you should use the approach illustrated in the following article.


Give the approach a try and let me know how it works for you.


Regards,
Viktor Tachev
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
John
Top achievements
Rank 1
Veteran
Iron
answered on 18 Nov 2021, 10:33 PM
i noticed you cross-posted with stackexchange.  I posted the answer here, but basically the sample they posted above is designed for mobile browsers.    To use an event on the kendo switch in a standard manner, you simply do it like all of their other controls.


$("#mycontrol").data("kendoSwitch").bind("change", function () { alert("change"); });


Tags
Switch (Mobile)
Asked by
morteza
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
John
Top achievements
Rank 1
Veteran
Iron
Share this question
or