HubSpot / messenger

Growl-style alerts and messages for your app. #hubspot-open-source
http://github.hubspot.com/messenger/
MIT License
4.03k stars 408 forks source link

How to make messenger work well #77

Closed clinyong closed 9 years ago

clinyong commented 9 years ago

I just follow the official document, but it can't work.

Here is my test exemple

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <link href="messenger.css">
    <link href="messenger-theme-future.css">

    <script type="text/javascript" src="jquery-2.1.1.js"></script>  
    <script type="text/javascript" src="messenger.min.js"></script>
    <script type="text/javascript" src="messenger-theme-future.js"></script>
</head>

<body>
    <script>
        Messenger.options = {
            extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
            theme: 'future'
        }

        Messenger().post({
          message: 'There was an explosion while processing your request.',
          type: 'error',
          showCloseButton: true
        });
    </script>
</body>
</html>
adamschwartz commented 9 years ago

Not sure if this is the only error, by it looks like you have a missing rel="stylesheet" from your <link> tags.

clinyong commented 9 years ago

I add rel="stylesheet" and it works well. Thanks!