Actually i tried to find it but i was lost in plug-in lines while debugging. I want to show ho开发者_开发知识库w it is working because there are different template plug-ins.
$("#teplateScript").tmpl(arrOfWhatWeWantToBind).appendTo("#divElementwhichWillContainTheOutput");
I want to serialize every element of array(to json of course) with JSON.stringify
and set the hidden element in the template. If i serialize object and add the output to the same object with another property, i could access it but i want to do this in the template like:
<script type="text/html">
<div>$(propOfElement)</div>
<input type="hidden" id="hdnObj_${idOfElement)" value="JSON.stringif( ?.....? )" />
</script>
What should i write to instead of ?....?
place ?
<script type="text/html">
<div>$(propOfElement)</div>
<input type="hidden" id="hdnObj_${idOfElement)" value="${ JSON.stringify($data) }" />
</script>
精彩评论