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

[API design] Per-element options #10

Open
njmcode opened this issue Apr 21, 2016 · 0 comments
Open

[API design] Per-element options #10

njmcode opened this issue Apr 21, 2016 · 0 comments

Comments

@njmcode
Copy link
Contributor

njmcode commented Apr 21, 2016

Want to be able to specify things like trigger point and other options on a per-element basis.

Potential options:

  • trigger point ('top' [default], 'center', 'bottom', percentile, or pixel value)
  • class to add/remove
  • multiple trigger point logic e.g. 'add class X when top edge passed, remove it when bottom edge passed'
  • single-use triggers vs re-triggerable
  • callbacks/events to fire when trigger points are hit

Implementation ideas:

  • data- params on DOM elements
  • Additional param to addElement passing in extra options
  • Additional methods to manipulate element options after registration

Ideas wanted!

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

No branches or pull requests

1 participant