BigW Consortium Gitlab

flash.js.coffee 253 Bytes
Newer Older
1
class @Flash
2 3 4 5 6 7 8 9 10 11 12
  constructor: (message, type)->
    flash = $(".flash-container")
    flash.html("")

    $('<div/>',
      class: "flash-#{type}",
      text: message
    ).appendTo(".flash-container")

    flash.click -> $(@).fadeOut()
    flash.show()