js/blocks.js
/**
     * Initializes all targets and their triggers/containers and then attaches
     * an event listener to the triggers that will delegate to the proper
     * driver upon the trigger being initiated.
     */
Initializes all targets and their triggers/containers and then attaches
an event listener to the triggers that will delegate to the proper
driver upon the trigger being initiated.
Initializes all targets and their triggers / containers and then attaches an event listener to the triggers that will delegate to the proper driver upon the trigger being initiated .
function init(ele){
        var triggers = ele.find('[data-target]')
        triggers.each(function(){
            var trigger = $(this)
            targetsOf(trigger).each(function(){
                executeEffectOn('init',$(this), trigger)
            })
        })
        $(_events).each(function(){
            var event = this+''
            if(event != 'init')
                triggers.each(function(){
                    var trigger = $(this)
                    var listeners = trigger.data('delegate') ? trigger.data('delegate').split(' ') : []
                    if($.inArray(event, listeners) < 0){
                        trigger.bind(event, delegate)
                        listeners.push(event)
                    }
                    trigger.attr('data-delegate', listeners.join(' '))
                })
        })
    }
function init ( ele ) { var triggers = ele . find ( '[data-target]' ) triggers . each ( function ( ) { var trigger = $ ( this ) targetsOf ( trigger ) . each ( function ( ) { executeEffectOn ( 'init' , $ ( this ) , trigger ) } ) } ) $ ( _events ) . each ( function ( ) { var event = this + '' if ( event != 'init' ) triggers . each ( function ( ) { var trigger = $ ( this ) var listeners = trigger . data ( 'delegate' ) ? trigger . data ( 'delegate' ) . split ( ' ' ) : [ ] if ( $ . inArray ( event , listeners ) < 0 ) { trigger . bind ( event , delegate ) listeners . push ( event ) } trigger . attr ( 'data-delegate' , listeners . join ( ' ' ) ) } ) } ) }
Initializes all targets and their triggers/containers and then attaches
 an event listener to the triggers that will delegate to the proper
 driver upon the trigger being initiated.
Initializes all targets and their triggers / containers and then attaches an event listener to the triggers that will delegate to the proper driver upon the trigger being initiated .
// Find all triggers (elements with a data-target) // Initialize the triggers and their targets // Binds all events that drivers have registered to all triggers