Endless Scroll Taps

2 posts, 0 answers
  1. Richard
    Richard avatar
    7 posts
    Member since:
    Mar 2012

    Posted 26 Nov 2012 Link to this post

    I have the following template: 
            <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>
    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:
    window.myTouch = {
        tap : function(e) {
            var id = e.touch['target']['context']['id'];
            console.log(id);
            $('#body-' + id).toggle();
        }
    }
    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.
  2. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 29 Nov 2012 Link to this post

    Hi Richard,

    I would like to recommend using the ListView click event instead, as it pretty much does the same as what you are trying to implement. 

    All the best,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top