Link to home
Start Free TrialLog in
Avatar of jackjohnson44
jackjohnson44

asked on

jsrender can't register a template

I can use jsrender but I am getting an error when trying to register a template.

Here is my fiddle:
http://jsfiddle.net/jmillman/LRD6E/11/



This is my code:
var data = {
    people: [{
        name: 'One',
        shirtColor: 'red',
        price: 1.001
    }, {
        name: 'Two',
        shirtColor: 'blue',
        price: 2.0
    }, {
        name: 'Three',
        shirtColor: 'green',
        price: 3.3333333
    }]
};

//this breaks
//$.templates({ tmpl: $("#template") });
//$("#output").html($.render.tmpl(data));

//this works
$("#output").html($("#template").render(data));
ASKER CERTIFIED SOLUTION
Avatar of Bruce Cadiz
Bruce Cadiz
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial