DailyJS

jQuery Roundup: 2.1 Beta, dna.js

2013-09-24 00:00:00 +0100 by Alex R. Young
Note: You can send your plugins and articles in for review through our contact form or @dailyjs.

jQuery 1.11 and 2.1 Beta 1

jQuery 1.11 and 2.1 Beta 1 have been released. The biggest news is jQuery now supports AMD, and is built with it. Internal dependencies are also managed with Bower.

By using AMD and Bower the jQuery developers are showing that they're receptive to the needs of modern client-side developers.

dna.js

dna.js (GitHub: dnajs / dna.js, License: GPLv3/MIT, jQuery: dna) by Dem Pilafian is a template library that uses valid HTML rather than a new syntax or inline JavaScript templates. It clones an element as many times as you need, and interpolates values.

A template looks like this:

<div>
  <h2>Featured Books</h2>
  <div id="book" class="dna-template">
    <div>Title:  <span><del>title</del></span></div>
    <div>Author: <span><del>author</del></span></div>
  </div>
</div>

And you can clone it with dna.clone('book', { title: 'The DOM', author: 'Jan' }).