I tried doing a search first cause I was sure that this had to have been discussed upteen times.
With all your help I have been making some great progress on my app. I might one day call myself a web developer. But very quietly so no one else hears.
Actually, that is pretty looking. Yeah the high level variable "temp" isn't pretty, but the rest is slick. It is why you are the expert and me just the learner.
"Sucks having to add that into your object"
Do you mean the js code into the template/html? or that goes in one of my .js files, or included in my json. The JSON doesn't sound right, but I think you mean in my template. Unless you tell me otherwise.
where the visibilityFunction is part of the JSON object. iCanHaz and mustache allows functions in data objects and calling them from the template. Looks like I will go down that path of adding a function after I get the data from the server.
Eric Pascarello wrote:Well functions are not in JSON, adding the function turns it into an object literal. Run it through JSON.parse() and you will be out of luck.
Another reason why I do not like it my solution.
Actually the template takes an object, so with that var holding that object I can add a function. When I retrieve the JSON from JQuery .post call it is assigned to a var, which I can then add the function