noty-demo.js 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. /* Noty */
  2. $(function() {
  3. var notes = [];
  4. notes[''] = '<i class="glyph-icon icon-cog mrg5R"></i>This is a default notification message.';
  5. notes['alert'] = '<i class="glyph-icon icon-cog mrg5R"></i>This is an alert notification message.';
  6. notes['error'] = '<i class="glyph-icon icon-cog mrg5R"></i>This is an error notification message.';
  7. notes['success'] = '<i class="glyph-icon icon-cog mrg5R"></i>You successfully read this important message.';
  8. notes['information'] = '<i class="glyph-icon icon-cog mrg5R"></i>This is an information notification message!';
  9. notes['notification'] = '<i class="glyph-icon icon-cog mrg5R"></i>This alert needs your attention, but it\'s for demonstration purposes only.';
  10. notes['warning'] = '<i class="glyph-icon icon-cog mrg5R"></i>This is a warning for demonstration purposes.';
  11. $('.noty').click(function() {
  12. var self = $(this);
  13. noty({
  14. text: notes[self.data('type')],
  15. type: self.data('type'),
  16. dismissQueue: true,
  17. theme: 'agileUI',
  18. layout: self.data('layout')
  19. });
  20. return false;
  21. });
  22. });