views:

18

answers:

0

Actually i tried to find it but i was lost in plug-in lines while debugging. I want to show how 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 ?