leonidas / transparency

Transparency is a semantic template engine for the browser. It maps JSON objects to DOM elements by id, class and data-bind attributes.
http://leonidas.github.com/transparency/
MIT License
969 stars 112 forks source link

Convenience addClass & co. helpers for attribute manipulation #35

Closed miohtama closed 12 years ago

miohtama commented 12 years ago

If we support

 directives : {
     class : function(attr) {}
 )

Should we include convenience functions in Transparency to support use cases for

Example implementation:

http://snipplr.com/view/3561/addclass-removeclass-hasclass/

pyykkis commented 12 years ago

Certainly helpful, but not must-have. Let's wait for more feedback, I want to keep Transparency small and simple.

pyykkis commented 12 years ago

Closing. I feel this is something that all DOM manipulation libraries provide, e.g., jQuery, MooTools, Dojo etc. I prefer focusing just on templating.