Hello :)
I did post the same kind of question in the kendo ui framework general Discussions and i got an answer but i fact my question is more about kendo ui mobile ...
I was wondering if it was possible to use the data-click property to call a method that is inside a class that i instanciate and also using the data-attributes to pass data to this method.
i did try some things but it doesn't work. someone gave an example of this in the kendo ui framework general section but it uses the data-bind property and i do want to use the data-click one :
i simply tried to remove the bind cause it wasn't what i wanted and replace the data-bind by a data-click but it of course doesn't work.
so would it be possible to provide an example that uses the things i said before please ?
I did post the same kind of question in the kendo ui framework general Discussions and i got an answer but i fact my question is more about kendo ui mobile ...
I was wondering if it was possible to use the data-click property to call a method that is inside a class that i instanciate and also using the data-attributes to pass data to this method.
i did try some things but it doesn't work. someone gave an example of this in the kendo ui framework general section but it uses the data-bind property and i do want to use the data-click one :
<!DOCTYPE html>
<
html
>
<
head
>
<
meta
name
=
"viewport"
content
=
"width=device-width"
/>
<
title
>Index</
title
>
<
link
href
=
"./styles/kendo.common.css"
rel
=
"stylesheet"
/>
<
link
href
=
"./styles/kendo.default.css"
rel
=
"stylesheet"
/>
<
script
src
=
"./lib/jquery.min.js"
></
script
>
<
script
src
=
"./lib/kendo.all.min.js"
></
script
>
<
script
>
var Test = kendo.Class.extend({
myAlert: function (e) {
alert("test");
}
})
$(document).ready(function () {
var test = new Test();
kendo.bind($("#test"), test);
})
</
script
>
</
head
>
<
body
>
<
div
data-role
=
"view"
id
=
"test"
>
<
a
href
=
"#test"
class
=
"button"
data-role
=
"button"
data-bind
=
"events: { click: myAlert }"
data-icon
=
"search"
>buttonTest</
a
>
</
div
>
</
body
>
</
html
>
so would it be possible to provide an example that uses the things i said before please ?
thank you so much for helping.