HubSpot / messenger

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

parentLocations #60

Closed sepiroth004 closed 10 years ago

sepiroth004 commented 10 years ago

Hello i have been wondering what is this for

Messenger({'parentLocations': ['.page', 'body']});
# Will try to insert the messenger into the el matching
# .page before inserting it into the page.

can you pls tell me if 'body' means the body tag? what is '.page'?

zackbloom commented 10 years ago

They are css selectors. So 'body' would be the body element, '.page' would be an element with the class page.

The property is used to have the messages inserted into an element on the page, rather than just into the body element. It's sometimes useful if you want the messages to appear in the flow of the document, but it's generally not encouraged.