JQuery-tmpl Template Switching Not working.
Posted
by
Mike
on Stack Overflow
See other posts from Stack Overflow
or by Mike
Published on 2011-02-16T14:46:08Z
Indexed on
2011/02/16
15:25 UTC
Read the original article
Hit count: 290
jQuery
|jquery-tmpl
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.
© Stack Overflow or respective owner