The documentation on the "Touch" framework is very light. What I want to do is something like this:
$("#myobject").on("kendotap", callback);
I see how Kendo uses the data-tap attribute, or I can apply the kendoTouch like this:
$("#list li").kendoTouch({
surface: $("#list"),
drag: function(e) {
console.log("you dragged a list item");
}
});
But that sees a little heavy. Any suggestions?
5 Answers, 1 is accepted
The touch component follows the same initialization pattern as all Kendo UI Widgets. Based on your application requirements/development approach, you may wrap it further in jQuery helpers or custom events.
I would appreciate if you can share some more details regarding the documentation - what would you describe as missing or lacking explanations/examples?
Petyo
the Telerik team
[quote]what would you describe as missing or lacking explanations/examples? [/quote]
I will jump in here... There doesn't seem to be very many MVVM examples or information on how to implement a mobile touch widget via MVVM and not with jquery declaration... or at least I can't find it after looking for 20 minutes, which is rather frustrating.
Hello David,
the mobile touch widget is instantiated with MVVM just like any other widget - by using the data-role attribute. The data attribute approach is covered in details here.
Regards,
Petyo
Telerik
Sure. The main help that is afforded for specifics pertaining to MVVM on a specific widget (in our case "TOUCH" widget) is this:
Camel-cased options are set via dash-separated attributes. For example, the ignoreCase option of the AutoComplete is set via data-ignore-case.
It seems like the mobile framework documentation in general is harder to find as of lately too. Is this all getting brushed under the rug in favor of Responsive approach?
Hello David,
The section I have linked to features code samples showing how to initialize a widget and bind to its events with MVVM. I consider these resources relevant to your query. Please let me know if I am missing something.
The mobile framework documentation is available at the root level of our docs website. Do you refer to a specific change we have introduced? Perhaps I am missing something.
Regards,
Petyo
Telerik