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

Update rellax.js #242

Closed
wants to merge 4 commits into from
Closed

Conversation

cvillalobos
Copy link

Given that the custom wrapper is not precisely working and some other have reported related issues I am adding here a new property switch called 'leadByViewPort' to manage if the animation should only happen when the element is within the ViewPort area.

The editor has automatically formatted/indexed a few lines throughout the file. However, main changes directly related to the new attribute added are the following:

  1. Line 93: leadByViewPort: false,
  2. Line 400: A new function was added to check if the element is within the ViewPort.
  3. Line 419: A new conditional added in the beginning of the function.
    if ((!self.options.leadByViewPort) || (self.options.leadByViewPort && $('#parallax-wrapper').isInViewport())) {

Adding new property switch called 'leadByViewPort' to manage if the animation should only happen when the element is within the ViewPort area.
@cvillalobos
Copy link
Author

@moeamaya, will you please take a look a the PR proposed? Thanks.

- Removing use of JQuery from the library as previous suggestion was using the $. dependency.
- Also removing hardwire value referencing the id of an element.
Removing more $ dependencies
@moeamaya
Copy link
Member

@cvillalobos Do you mind making a new PR without the formatting changes?

@cvillalobos
Copy link
Author

@moeamaya, Ok yes, I'll try to send it today. Thanks for taking the time to review this. I'll make sure to notify you when the new PR is in place.

Removing formatting changes.
@cvillalobos
Copy link
Author

Closing PR as it has included some inconvenient formatting changes.

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

Successfully merging this pull request may close these issues.

None yet

2 participants