I'm developing a solution using kendo UI mobile there I have custom template like this
<script type="text/x-kendo-template" id="customListViewTemplate">
#if(type === 'Input'){#
#if(status === 'true'){#
<a> #: name #</a><img id="alarm_indicator" src="img/bullet.png">
#}else{#
<a> #: name #</a><img id="alarm_indicator" src="img/bullet_red.png">
#}#
#}else{#
#if(outputconfig === 'true'){#
#if(status === 'true'){#
#var i = 1 #
#i++#
#alert('rr')#
#localStorage.setItem(i,1)#
<a> #: name #</a> <input id="mobile-switch" data-role="switch" index="1" data-change="app.watchguard.switchChange" checked="checked" data-enable="false"/>
#}else{#
#var i = 1 #
#i++#
#localStorage.setItem(i,0)#
<a> #: name # </a> <input id="mobile-switch" data-role="switch" index="2"data-change="app.watchguard.switchChange" data-enable="false"/>
#}#
#}else{#
#if(status === 'true'){#
#var a = 1 #
#a++#
#localStorage.setItem(a,1)#
<a> #: name #</a> <input id="mobile-switch" data-role="switch" data-change="app.watchguard.switchChange" checked="checked" />
#}else{#
#var a = 1 #
#a++#
#localStorage.setItem(a,0)#
<a> #: name # </a> <input id="mobile-switch" data-role="switch" index="4" data-change="app.watchguard.switchChange" />
#}#
#}#
#}#
</script>
Here it loads a List view from data source with a mobile switch button on the right. (Each list item with a mobilw switch) Problem is I need to get the position of mobile switch button through on change() (ex: 0,1,2 ). How do I do that? Can some one help me :-)
Thanks
Chinthaka