Skip to content

Instantly share code, notes, and snippets.

@harmaty
Created September 29, 2011 14:15
Show Gist options
  • Save harmaty/1250806 to your computer and use it in GitHub Desktop.
Save harmaty/1250806 to your computer and use it in GitHub Desktop.
Usage of gritter
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Nothing</title>
</head>
<body>
<%= content_for :gritter do %>
<%= js add_gritter("This is a notice", :image => :success,
:title => "Notice", :sticky => false) %>
<% end %>
<%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" %>
<%= include_gritter %>
<%= yield :gritter %>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment