agenda-libre-ruby/app/assets/javascripts/flash.js.coffee

8 lines
286 B
CoffeeScript

$(document).ready ->
$('#flash_messages .flash, #error_explanation.flash').removeClass('flash').each ->
$(this).hide()
jQuery.gritter.add
image: "/assets/#{$(this).attr('class')}.png",
title: $(this).children('h2').text(),
text: $(this).children('p').text()