I have the following template:
It works great at first. Once I add to the list view using endless scroll the newly generated items aren't tappable. This is my myTouch section:
Is there something I have to do to get this to work on the newly generated list view items? I tried the old stand by of an onClick event but just doesn't work right on the iPhone.
Thanks.
<
script
type
=
"text/x-kendo-template"
id
=
"recentPostListViewTemplate"
>
<
div
id
=
"#= id #"
data-role
=
"touch"
data-tap
=
"myTouch.tap"
>#= title #
</
div
>
<
div
class
=
"articleBody"
id
=
"body-#= id #"
>
#= content #<
br
>
<
a
href=#= custom_fields.syndication_permalink[0] #
>Read Full Story</
a
>
</
div
>
</
script
>
window.myTouch = {
tap : function(e) {
var id = e.touch['target']['context']['id'];
console.log(id);
$('#body-' + id).toggle();
}
}
Thanks.