Skip to content
pyykkis edited this page Jul 28, 2012 · 9 revisions

Here are listed usage patterns how to apply Transparency.js to common front end development problems.

This manual is Wiki-based so please feel free to contribute examples for your own use cases.

Creating attributes with Transparency

Manipulate DOM directly with Transparency and jQuery

Populating a table using Transparency and CoffeeScript

Populating a table using Transparency, jQuery, JSON and AJAX

Using Transparency with Backbone

Setting event handlers

Setting, e.g., onclick event handlers with directives is ugly and inefficient. Use your favorite javascript library instead. With JQuery, .on is particularly good. See To-do example for the details.

Prepending/appending content, chat-like, infinity scroll manner

Define a separate DOM section as a template, render the data, clone the result and append it to your view. See Chat example for the details.