binder
A micro-library for binding functions to attributes in the dom. No dependencies. IE8+.
$ npm install attr-binder
var bind =
bind(attribute, fn), bind(attribute, starting_node, fn)
Bind a DOM attribute to a function, passing in the attribute's value. The function is passed the node, the attribute value, and the attribute name.
For example, we have a "Post Comment" button that shows a sign-in modal or a comment modal depending on whether the user is signed in.
**This will get turned into markdown using marked.js**
// Automatically render markdown