Skip to content

Support or example for dynamic use #4

@gabetax

Description

@gabetax

The miniNotification works great if you are displaying alerts included in the HTML sent by the server. However, it isn't oriented out of the box to display messages generated client-side, either from MVC libraries like Backbone, Ember, Angular, or just straight jQuery.

What do you think about creating either a documented example or integrated method for a dynamic notification, roughly along the lines of:

jQuery.notify = (message, options) ->
  $el = $('<div class="mini-notification"></div>').html(message)
  default_options = { onHidden: -> $el.remove() }
  $('body').prepend($el)
  $el.miniNotification($.extend(default_options, options))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions