Sha256: 2df9018427e278221958f8f18c0e709d8d7dd046681a0e030a4776894e62ab3c
Contents?: true
Size: 472 Bytes
Versions: 8
Compression:
Stored size: 472 Bytes
Contents
// Behaviors are a way of specifying a behavior attribute on an HTML tag and having it always *work* // // For example, we'd specify: // // <div behavior="example"> // ... // </div> // // And we would automatically have the behavior setup ... document.addEventListener("turbolinks:load", function(){ _.each( $('*[behavior=example]'), function(obj){ obj.controller = new Example(obj) }) }) class Example { constructor(obj, opts={}){ // do something } }
Version data entries
8 entries across 8 versions & 1 rubygems