About Interaction Lib

Interaction Lib is a stand-alone prototyping framework intended to bridge the gap between your document and its functionality. Its primary function is to allow interactions to be wired up to your markup declaratively using a common set of data attributes.

Interaction Lib has also been coupled with a basic set of ajax functionality modeled after existing DOM form/frame patterns offering codless SPA-like interactivity. If jQuery is loaded, Interaction Lib will also integrate with your existing jQuery plugins allowing pages to be written and configured with little to no need for site-specific javascript.

The intention is to optimize ui prototyping by supporting quick wireups for existing and custom interaction plugins.

Getting Started ::crash course::

Creating New Behaviors
jQuery
$.fn['alert-click'] = function() {
   return $(this).each(function() {
      $(this).on('click', function() {
         alert('I've Been Clicked!');
      });
   });
};
         
Raw javascript
behaviors.add('alert-click', function() {
   this.addEventListener('click', function() {
      alert('I've Been Clicked!');
   });
});
         
Adding Behaviors To Elements
HTML
<div data-behavior="alert-click">Click Me Baby!</div>