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

Unstick and Stick two elements #16

Open
anthonybalmeo opened this issue Jan 12, 2017 · 0 comments
Open

Unstick and Stick two elements #16

anthonybalmeo opened this issue Jan 12, 2017 · 0 comments

Comments

@anthonybalmeo
Copy link

Do you have any suggestions of sticking and unsticking elements using the events sticky-start and sticky-end

  didInsertElement() {
    Ember.$('.sticky-nav').on('sticky-start', function() {
    Ember.$('.app-header').unstick();
    });

    Ember.$('.sticky-nav').on('sticky-end', function() {
      Ember.$('.app-header').sticky({
        zIndex: 50,
        wrapperClassName: 'app-header-sticky',
      });
    });
  },

I have something like this but when I call unstick consecutively, I get a Cannot read property 'stickyWrapper' of undefined. It still works but there's some step prior that errors out that I'm trying to figure out. Thoughts?

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

1 participant