Ok will do.
A lot of the problems I have had with switching from v1 to v2 (auto
rendering arrays and some others) seems to be solved by doing it
manually. One of things that attracted me to pure over chains.js was
the simplicity. Is there plans to make v2 simpler again once it
restabalizes? Maybe once I get better at js I can help out as well. I
really like this project and would love to help out :)
On Oct 30, 12:31 pm, Mic Cvilic <
tch...@gmail.com> wrote:
> You'll have to go in manual mode on this one.
> Like:
>
> //compile
> var dir = {
> 'tr':{
> 'info<-item_info':{
> '.quantity':'info.quantity',
> ".quantity@class+": function(arg){
> return " quantity" + arg.pos;
> },
> '.selling_price':'info.selling_price',
> ".selling_price@class+": function(arg){
> return " selling_price" + arg.pos;
> }
> }
> }};
>
> var fn = $("#item_infos").compile(dir);
>
> //at each refresh
> var data = {
> item_info: [{
> quantity: "1",
> selling_price: "19.99"
> },{
> quantity: "2",
> selling_price: "0.99"
> }]};
>
> $("#item_infos").render(data, fn);
>