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

Doesn't work in Safari / Errors in Chrome console #41

Closed
AndrewDryga opened this issue Jun 6, 2013 · 12 comments
Closed

Doesn't work in Safari / Errors in Chrome console #41

AndrewDryga opened this issue Jun 6, 2013 · 12 comments

Comments

@AndrewDryga
Copy link

Safari 6.0.4 (8536.29.13):

TypeError: 'null' is not an object (evaluating 'getComputedStyle($elem[0])[prefixedTransform]') jquery.stellar.js:47

Parallax effect works only on first section. Massive issues if you scroll and then reload the page (try few times): backgrounds appear to be empty. Sometimes all of them, sometimes not.


Chrome 28.0.1500.29 beta:

Uncaught TypeError: Cannot read property 'WebkitTransform' of null jquery.stellar.js:47

But still, everything else works fine.


And if i remove this code from config:

          scrollProperty: 'transform',
          positionProperty: 'transform'

Then scroll runs backwards on both Chrome and Safari. Chrome issue can be fixed by initializing Stellar after browser fully loads page, but i wasn't able to find how to fix it in Safari.


You can see it here: http://tynkevych.com/ (on production minified version is applied, error preserves)
Code: https://github.com/AndrewDryga/tynkevych.com/tree/gh-pages

@ceehaupt
Copy link

Same problem here!

@jhned
Copy link

jhned commented Jun 17, 2013

I'm having the same issue.

@markdalgleish
Copy link
Owner

I've had a quick look at your code, and it appears you're making a couple of mistakes:

  • You don't need to specify a position property adapter if you only have parallax backgrounds. The 'transform' adapter is written assuming that you have elements that it's acting on.
  • The 'transform' scroll property adapter is generally only for mobile scrolling libraries like iScroll, so the default value should be fine.

Are you able to fix these so I can see the actual problem in isolation?

@ceehaupt
Copy link

I'm using the postionProperty default and it doesn't work.

@markdalgleish
Copy link
Owner

@ceehaupt Are you using the 'transform' scroll property adaper?

@ceehaupt
Copy link

No. I'm calling stellar like this: $.stellar({horizontalScrolling: false,hideDistantElements: false});
And the other parameters are the standard defaults.

@markdalgleish
Copy link
Owner

Then you shouldn't be getting the same error as the parent, right? Can I see what you have so far?

@ceehaupt
Copy link

Scroll down and look at the background image in the section "team". First it's ok. But if you click on "Unsere Referenzen" above, stellar refreshes and in Safari the background image is repositioned false.
http://www.polygo.de/abnahme/polygoverlag/

@AndrewDryga
Copy link
Author

@markdalgleish sure, here it is:
http://tynkevych.com/index_testing.html

Safari: only 1st screen is working, everything else appears to be blank. Google Chrome scroll is not so smooth, as with transition.

@AndrewDryga
Copy link
Author

@ceehaupt Same for me, doesn't work in Safari as it works in Chrome.

@OscarBarrett
Copy link

This error occurs if you specify 'transform' as the scrollProperty without calling stellar on an actual element.
i.e. jQuery.stellar({ scrollProperty: 'transform' })
will throw Uncaught TypeError: Cannot read property 'WebkitTransform' of null.

Instead, you should call jQuery('#scroller').stellar({ scrollProperty: 'transform' })
where #scroller is the wrapper element for your parallax elements.

@AndrewDryga
Copy link
Author

@OscarBarrett I call it on actual elements: $('.sections').stellar(..)

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

5 participants