Sha256: 3723a1f2b6252723545b0539f6ac6a93ea0e45906748b48de0f2feaa1e91e60d
Contents?: true
Size: 534 Bytes
Versions: 2
Compression:
Stored size: 534 Bytes
Contents
# This mixin adds a 'clickable' aspect to modules. # This means clicking anywhere on the module fires the 'clicked' event. window.modularity.clickable = constructor: -> @container.click @container_clicked # Events that are fired by this mixin. events: clicked: 'clicked' # Programmatically click this clickable element. # For testing and scripting. click: -> @container.click() # Event handler for clicks on this clickable element. container_clicked: -> @fire_event modularity.clickable.events.clicked
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
modularity-rails-0.16.0 | app/assets/javascripts/modularity/mixins/clickable.coffee |
modularity-coffee-rails-0.0.1 | app/assets/javascripts/modularity/mixins/clickable.coffee |