0.4.0 • Published 10 years ago

dt-jquery v0.4.0

Weekly downloads
78
License
-
Repository
github
Last release
10 years ago

Δ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

0.4.0

10 years ago

0.3.6

11 years ago

0.3.5

11 years ago

0.3.4

11 years ago

0.3.3

12 years ago

0.3.2

12 years ago

0.3.1

12 years ago

0.3.0

12 years ago

0.2.6

12 years ago

0.2.5

12 years ago

0.2.4

12 years ago

0.2.3

12 years ago

0.2.2

12 years ago

0.2.1

12 years ago

0.2.0

12 years ago

0.1.1

12 years ago

0.1.0

12 years ago

0.0.1

12 years ago