JQuery-tmpl Template Switching Not working.
- by Mike
I'm trying to implement "more/less" functionality using the official jquery-tmpl plugin.
I've looked at the examples, but I cannot seem to get the functionality to work in my own implementation.
When I click on one of my "More" buttons, I seem to get an error thrown of:
Uncaught TypeError: Property 'tmpl' of object #<an Object> is not a function
This is my implementation here
From what I can tell, the example I'm trying to replace is doing the following:
Render the "Master" template
On-click: Find the corresponding template object (tmplItem) to the clicked element.
Pass in reference to a new template.
Call the update function to re-render.
Have I understood the documentation wrong? From what I can tell I'm doing the same thing as the example on the official documentation.