Sha256: 69a35c8cd00029a5778c809d494bea12094aaf1e9d49f0f97a1ae204e4d1fd26

Contents?: true

Size: 567 Bytes

Versions: 1

Compression:

Stored size: 567 Bytes

Contents

var CoreFlash = (function () {

  function initializeFlashCloseButton (flash) {
    var closeButton = $(flash).find('.elements-flash__close-button')
    $(closeButton).click(function (e) {
      e.preventDefault()
      flash.addClass('elements-flash--hidden')
    })
  }

  function _initFlashCloseButton () {
    $('.elements-flash').each(function () {
      initializeFlashCloseButton(this)
    })
  }

  // Init:
  function init () {
    _initFlashCloseButton()
  }

  return {
    init: init,
    initializeFlashCloseButton: initializeFlashCloseButton
  }

})()

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lato_core-2.1.3 app/assets/javascripts/lato_core/modules/CoreFlash.js