Endless Scrolling: Invalid template: <a href ...</a>

1 posts, 0 answers
  1. David
    David avatar
    1 posts
    Member since:
    Oct 2012

    Posted 24 Oct 2012 Link to this post

    Hi everyone!

    I have this endless scrolling component but in my case I want to make every <li> clickable, so i designed this template:

    ...
    <script id="endless-scrolling-template" type="text/x-kendo-template">
    <a href="#overview-account">
    <div id="parent">
       <div class="img-div">
    <img src="../../content/mobile/overview/nairobi.jpg" />
    </div>
    <div class="name-div">random_string</div>
    <div class="url-div">random_string</div>
    <div class="dist-div">random_string</div>
    </div>
    </a>
    </script>

    But when the page is rendered nothing is displayed...


    If I remove the <a tag like this:
    ...
    <script id="endless-scrolling-template" type="text/x-kendo-template">
    <div id="parent">
       <div class="img-div">
    <img src="../../content/mobile/overview/nairobi.jpg" />
    </div>
    <div class="name-div">random_string</div>
    <div class="url-div">random_string</div>
    <div class="dist-div">random_string</div>
    </div>

    ...everything is ok but the elements are not clickable :/

    This is the exception:
    Thank you all!

    Uncaught Error: Invalid template:'<li data-uid="#=uid#"> <a href="#overview-account"> <div class="parent"> <div class="img-div"> <img src="../../content/mobile/overview/nairobi.jpg" /> </div> <div class="name-div">random_string
    </div> <div class="url-div">random_string
    </div> <div class="dist-div">random_string
    </div> </div> </a> </li>' Generated code:'var o,e=kendo.htmlEncode;with(data){o='<li data-uid="'+(uid)+'">\n <a href="';overview-account"> <div class="parent"> <div class="img-div"> <img src="../../content/mobile/overview/nairobi.jpg" /> </div><div class="name-div">random_string
    </div><div class="url-div">random_string
    </div> <div class="dist-div">random_string
    </div> </div> </a> </li>;o+=;}return o;'


Back to Top