<
script
type
=
"text/x-kendo-tmpl"
id
=
"my-template"
>
<
ul
>
<
li
>
<
div
onclick
=
"showToggle()"
> Show/Hide Form</
div
>
<
div
id
=
"myform"
> My Form Stuff</
div
>
</
li
>
<
ul
>
</
script
>
So in the above I want to click on the div or button and what ever and toggle the other part of the list item.
<ul data-role="listview" id="myList"
data-bind="source: listOfStuff"
data-template="my-template"></ul>
now I can't really assign IDs to this. I just want to toggle it with some function like below. Maybe this is more of a javascript question. I guess I could also add another variable to my list of objects in my mvvm and then set that to visible true on a click, but I'd rather not add on the to the view model.
function showToggle(){
if ( $('#myform') visible) do
$('#myform').hide();
else
$('#myform').show();
}