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

Provide ability to specify parent container #13

Open
danhyun opened this issue Aug 13, 2015 · 0 comments
Open

Provide ability to specify parent container #13

danhyun opened this issue Aug 13, 2015 · 0 comments

Comments

@danhyun
Copy link

danhyun commented Aug 13, 2015

Firstly thanks for this amazing lib, I was looking for a nice non bootstrap solution and this fit the bill.

As I was implementing this lib I noticed that the change event wasn't being fired and after some debugging I've found that the offsetIndex is being determined based on the element's direct parent offset.

In my structure my header elements are nested two levels deep. It would be as we're calculating the offset for each element if we can take into account all parent elements until we hit the main container.

https://github.com/gajus/contents/blob/master/src/contents.js#L477

That way our offset index will be more reliable.

Thanks again.

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