Δt jquery adapter - async & dynamic templating engine
CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src use other jQuery module Jun 26, 2014
.gitignore add tests Apr 12, 2012
.npmignore new build system Jan 5, 2012
.travis.yml exclude node 0.4.x from travis runs Aug 21, 2014
Cakefile add tests Apr 12, 2012
LICENSE MIT license Dec 14, 2011
README.md add link to the browser logic Jul 2, 2012
dt-jquery.js new build system Jan 5, 2012
package.json bump version Aug 21, 2014

README.md

Δt jQuery Adapter

This is an jQuery Adapter for Δt.

It listen on the template events and writes to the DOM.

The core logic is implemented in it's module to share it with other browser based adapters like dt-DOM

Check out the demo!

Installation

$ npm install dt-jquery

How this Adapter works:

<script src="dt-jquery.browser.js"></script>
<scipt>
    var jqueryify = window.dynamictemplate.jqueryify; // get the jquery adapter
</script>

Just throw your template in and add it to the DOM when it's ready:

var tpl = jquerify(template(mydata));
tpl.ready(function () {
    $('.container').append(tpl.jquery);
});

Documentation

jqueryify(tpl)

tpl = jqueryify(new dynamictemplate.Template)

Expects a fresh Δt template instance (fresh means, instantiated in the same tick to prevent event loss).

It just simply listen for a bunch of events to use jQuery for DOM manipulation.

Uses requestAnimationFrame for heavy DOM manipulation like node insertion and node deletion.


Overrides the query method of the async XML Builder.

For query type text it returns the result of jQuery.text.

For query type attr it returns the result of jQuery.attr.

For query type tag it returns a dummy object that it will receive again on an add event.

Build Status