github
Advanced Search
  • Home
  • Pricing and Signup
  • Explore GitHub
  • Blog
  • Login

jquery / jquery-tmpl

  • Admin
  • Watch Unwatch
  • Fork
  • Your Fork
  • Pull Request
  • Download Source
    • 175
    • 16
  • Source
  • Commits
  • Network (16)
  • Graphs
  • Branch: master

click here to add a description

click here to add a homepage

  • Switch Branches (1)
    • master ✓
  • Switch Tags (0)
  • Branch List
Sending Request…

A templating plugin for jQuery. — Read more

  Cancel

  Cancel
  • HTTP
  • Git Read-Only

This URL has Read+Write access

Fail on all falsy values. 
jeresig (author)
Wed Mar 31 18:29:02 -0700 2010
commit  ded2653720d6d86d94bd
tree    b36af1d71489c7afd4a8
parent  1018717e952374cf92f7
jquery-tmpl /
name age
history
message
file README.md Thu Mar 04 20:05:07 -0800 2010 Tweaked the README example. [jeresig]
file demo.html Wed Mar 31 12:48:19 -0700 2010 Add in support for executing functions that are... [jeresig]
file jquery.tmpl.js Wed Mar 31 18:29:02 -0700 2010 Fail on all falsy values. [jeresig]
README.md

A jQuery templating plugin - created for demonstration purposes.

$("#sometmpl")
    .render( dataObject ) // Returns a LI with all the data filled in
    .appendTo("ul");

$("#sometmpl")
    .render( arrayOfDataObjects ) // Returns multiple LIs with data filled in
    .appendTo("ul");

// Appends one LI, filled with data, into the UL
$("ul").append( tmpl, dataObject );

// Appends multiple LI, filled with data, into the UL
$("ul").append( tmpl, arrayOfDataObjects );
Blog | Support | Training | Contact | API | Status | Twitter | Help | Security
© 2010 GitHub Inc. All rights reserved. | Terms of Service | Privacy Policy
Powered by the Dedicated Servers and
Cloud Computing of Rackspace Hosting®
Dedicated Server