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

Filed under:
|

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:

  1. Render the "Master" template
  2. On-click: Find the corresponding template object (tmplItem) to the clicked element.
  3. Pass in reference to a new template.
  4. 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

Related posts about jQuery

Related posts about jquery-tmpl