Skip to content

Instantly share code, notes, and snippets.

$.ajax({
// ...
}).fail(function(response){
window.Flash(response.message, 'error', $('.some-class-container'))
})
// ..helpers/flash_helpers.js
window.Flash = function (message, type, $container) {
$container = ($container == null) ? $('.container-fluid.container-page') : $container
# Keybindings
unbind c
unbind C-b
unbind C-a
unbind %
unbind ,
unbind .
unbind n
unbind p
unbind '"'