Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom events not working #133

Open
RomkaLTU opened this issue Feb 10, 2022 · 2 comments
Open

Custom events not working #133

RomkaLTU opened this issue Feb 10, 2022 · 2 comments

Comments

@RomkaLTU
Copy link

RomkaLTU commented Feb 10, 2022

Custom events not firing.
Lib version: 5.1.2

new Gumshoe('#services-nav-mobile a', {
    events: true,
    offset: function () {
      return stickerEl.getBoundingClientRect().height;
    }
  });
document.addEventListener('gumshoeActivate', function (event) {
    console.log(event.target);
  }. false);
@aaofyi
Copy link

aaofyi commented Nov 20, 2022

Just tested this. I think your problem is the period in the second code block }. false. The following works for me.

document.addEventListener('gumshoeActivate', function (event) {
  console.log(event.target);
}, false);

@RomkaLTU
Copy link
Author

Can't confirm it now because project is done already ant shipped, but very possible that this was the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants