Closed dgilfoy closed 10 years ago
The messenger function gets added here: https://github.com/HubSpot/messenger/blob/master/src/coffee/messenger.coffee#L719 on the jQuery object available globally when you bring the file in: https://github.com/HubSpot/messenger/blob/master/src/coffee/messenger.coffee#L1
Is there any chance you're bringing in two copies of jQuery?
Thanks for the quick response, zackbloom,
Not that I can tell. Unfortunately I'm having to use Drupal (and using the jQuery update module - so 1.8.2), but also using the 'jQuery Once' plugin (some module or another is using it) and the jQuery Foundation tooltips library (Foundation 3...) and also jQuery UI.
I double checked my resources tab, and my network tab in dev tools, and not seeing anything on that end. I'll keep trying stuff and keep you posted if I notice anything though.
If you want to log jQuery
when it's added, and again when you're trying to use it, maybe that will help elucidate what's going on?
Thanks zack, that led me to figure out there was some scope issues, seems to be working just fine now, thanks again for such a great library.
Trying to have multiple messenger containers on a single page (one standard, attached to body, the other contained in a wrapper div). However, I'm having some issues getting it to work as outlined in the Docs.
When I try to set an instance such as:
I get the error
Not quite sure what I'm doing wrong. I'm loading jQuery first, then messenger and then the js file that contains my initialization. There are a few other libraries being called in between those files, but not getting any conflict errors.
I don't see the .messenger method anywhere in the jQuery object either (Chrome Developer tools).
Thanks in advance, it works wonderfully with once instance, but getting that second one is proving to be a bit tougher.