Thread:Jens Ingels/@comment-24416108-20141128155015/@comment-3271569-20141129230857

You really don't have to make it that complex with exact refference. JavaScript has an object model that perfectly supports refers.

For example with the previous code I showed in the example. It's perfectly possible to reffer to all existing templates on a page. You don't have to call the function multiplay style if the referring just change with one diggit.

You already told me that you change the refference but I give this example with the old one:

So you don't really have to reffer to races if the base stats aren't effected. And even than you can still call for the race data while collecting the data from that template number. Their is a reason why I named the div "template-unit human calvalry". This way you can implement the class template-unit to all existing unit templates. Their is also a reason why their are spaces between unit, human & calvalry. This are actualy different classes:
 * template-unit
 * human
 * calvalry

The reason why template-unit class is needed is to call the function. Not to call the data. All templates are exactly the same so why would you need to call it differently.

Can you give me a list from all unit templates? Than I will will wrap the tags they can all be called by the function.