Comments (8)
Unfortunately, this is a limitation of the way this plugin is implemented. The parallax layers are essentially fixed position elements behind the document body so they will show up behind anything that doesn't have a background applied to it. The way I've been using it is to add background: #fff
to the sections above and below the parallax which mask any accidental bleeding of the image into the background of the content surrounding it. If you opt for this method, you can also set a bleed
attribute to make the background image slightly bigger than the target element. This will reduce some jittering in browsers which don't keep up well with the animation (like Safari).
See the parallax demo page and its source as an example.
from parallax.js.
Thank you Sir. This works for me like a charm - ones more thank you for the plugin!
from parallax.js.
... is there any chance to fix safari as well Sir?
http://www.piotrmajcher.nazwa.pl/heima/folio/lazio-ss-merda/
from parallax.js.
Is it not working in Safari? It appears to be working for me.
from parallax.js.
Hello @casikr, after revisiting this issue it appears that your problem is similar to issue #34. Triggering a resize and a scroll event appears to fix the issue when I tested this in Safari. Please review the solution there and let me know if it helps.
Closing for now.
from parallax.js.
Hi Mike, thank you - this is partially the case, when I disable shareholic plugin (which appear to resize window) it works fine and my parallax image appears and scrolls exactly as it suppose to. I was trying to add jQuery(window).trigger('resize').trigger('scroll') to the plugin but - as this is quite complicated can't find where to put it to get this working. Any indications?
Second thing is the overlap in Safari 6 (I test in on Windows7). But this is not very important - the usage of Safari 6 in my country is part-per-thousend.
Best regards
from parallax.js.
Unfortunately, I am not familiar with the Shareholic plugin. Typically, these types of plugins use javascript to manipulate the DOM, sometimes after an asynchronous request to some external server. Well written plugins will provide a way to "hook" into these events and trigger something once the operation is finished, but in the case that it does not, you would need to locate the part of the code where the DOM manipulation is performed and place the trigger('resize')...
statement after that.
Another, hacky solution would be to perform the triggers automatically after a delay, like the following example:
setTimeout(function() {
jQuery(window).trigger('resize').trigger('scroll');
}, 500); // wait 500ms
You'd need to play around with the delay value so as to approximate the time at which the DOM is done being modified.
from parallax.js.
I love your plugin. It's very simple and I like the fact that we see a fixed image rather than the parallax effect on mobiles. I have a problem though where the content overlaps the parallax sections when resizing and scrolling. I have used jQuery(window).trigger('resize').trigger('scroll'); and I also tried copying the entire script and the html parallax-container from http://pixelcog.github.io/parallax.js/. I also tried deleting all other script links but I still get the same problem. My website can be found here: https://dl.dropboxusercontent.com/u/43708060/MyAlpine/index.html.
Your help would be very appreciated !!!
from parallax.js.
Related Issues (20)
- text-align affects background location
- .trigger('resize').trigger('scroll') not working HOT 3
- iOS 13 issue with inner HTML HOT 2
- CDN version outdated HOT 2
- Using a semi-transparent container over background image lag HOT 1
- Resize does the exact opposite
- Using "sticky"element offsets parallax container HOT 3
- Add alt attribute? HOT 3
- Vanilla JS version? HOT 2
- V. 1.5 works on mobile devices, but this v. 2.0 does not?
- Flash on image load
- is it possible to put text on the images with html for the effect? HOT 2
- Setting speed to negative value does not reverse parallax effect
- Feature request: Support responsive images
- Parallax 2.0 not working on mobile HOT 1
- Does not work with Angular Universal HOT 2
- parallax.js limits width?! HOT 1
- Feature Request: Can you have a video parallax as well?
- Parallax is not a function
- Doesn't work properly when using it with Bootstrap
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parallax.js.