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;'
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;'