hakanersu / AmaranJS

Nice, sleek and stylish notifications.
http://amaranjs.com/
MIT License
213 stars 59 forks source link

How to copy the alert / error messages displayed? #14

Closed KrishnaPG closed 9 years ago

KrishnaPG commented 9 years ago

I am not able to see a way to copy the error messages displays using this package. Any click on the displayed message removes it from screen.

When displaying errors, it is important that users can copy | paste the error message displayed in the alert (so that they can communicate it with admin / support later regarding the problem) - but right now, they just disappear once the user clicks on them.

I was hoping that with the 'close button' option or 'sticky' option, the message would go away only when clicked on the close button - but doesn't seem to be so. Clicking anywhere, no matter with or without close button - removes the message.

How to make it work that only when clicked on the 'close button' (the small x button on top right) it would go away, otherwise it would stay?

hakanersu commented 9 years ago

Hi @KrishnaPG

You can use closeOnClick and closeButton.Just check examples/031-option-close-button.html

  $.amaran({
        'message'       :'My first example!',
        'sticky'        :true,
        'closeOnClick'  :false,
        'closeButton'   :true
    });
KrishnaPG commented 9 years ago

Worked like charm - thanks much.