Comments (11)
I think this is possible only with custom attribute for videos instead of [data-jarallax-video].
<div class="jarallax" data-my-bg-video="https://youtube..."></div>
if(!(navigator.userAgent.indexOf('MSIE')!==-1 || navigator.appVersion.indexOf('Trident/') > 0)) {
$('.jarallax').each(function () {
$(this).jarallax({
videoSrc: $(this).attr('data-my-bg-video')
});
});
}
from jarallax.
Oh, just found a bug. Video parallax will not work properly with enableTransform: false
. Will be fixed today. Thank you.
from jarallax.
Hi, hello0robot.
I checked solutions, but nothing works. I think the only way - stop using translate3d (use translate, translateX, translateY instead) + disable transform parallax for IE 11 and lower.
Try this code:
$('.parallax').jarallax({
enableTransform: !(navigator.userAgent.indexOf('MSIE')!==-1 || navigator.appVersion.indexOf('Trident/') > 0)
});
Best regards, nK.
from jarallax.
As for now I'm checking browser with userAgent
and disabled jarallax completely for IE:
/**
* Detect IE
*/
function is_IE() {
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
var trident = ua.indexOf('Trident/');
if (msie > 0 || trident > 0) {
return true;
} else {
return false;
}
}
/**
* Parallax
*/
if(!is_IE()) {
$('.parallax-video').jarallax();
}
Your solution with enableTransform
looks nicer though. Will it work with video backgrounds?
from jarallax.
Try 1.7.1 version. Video parallax with enableTransform: false
should work now.
from jarallax.
Sorry, I've been a little bit busy recently. Will check asap and get back to you. Thanks!
from jarallax.
OK, I've just tested.
It seems to do the job and disable 3d transforms. However it looks really jerky in IE, so I disabled it completely like here: #17 (comment)
However there's a new bug, that doesn't prevent videos from loading, even if I don't init jarallax via jQuery. I suppose it takes data attributes instead from HTML and loads jarallax by itself.
It wasn't an issue in 1.7.0, so I'd rather revert to it as for now.
from jarallax.
Since version 1.7.1 Jarallax automatically initialized on elements with attribute [data-jarallax-video]. Some of users requested that behavior and I agree with them.
Changed line - https://github.com/nk-o/jarallax/blob/master/jarallax/jarallax.js#L704
from jarallax.
Yes, it's fine.
But how can I disable Jarallax completely in IE, including videos then?
from jarallax.
That's a pity. Thanks anyway.
from jarallax.
Did it the way you suggested. It's all good.
Thanks a lot!
from jarallax.
Related Issues (20)
- How to disable jarallax only for safari Mac OS HOT 1
- Problem while trying to build/run jaralax with an angular universal app. HOT 3
- Local Video doesn't play in Safari HOT 2
- Don't force usage of 'jarallax-img' HOT 1
- add async support HOT 1
- "Failed to execute 'postMessage' on 'DOMWindow': The target origin provided ('https://www.youtube-nocookie.com') does not match the recipient window's origin ('https://myapp.com')" HOT 2
- Replace deprecated Vimeo Simple API usage HOT 2
- ChainAlert: npm package release (2.0.0) has no matching tag in this repo
- Error with Permissions-Policy header: Unrecognized feature: 'ch-ua-full-version-list'. HOT 1
- WebP detection with Modernizr HOT 1
- videoPlayOnlyVisible HOT 1
- Image is not changing when used picture tag on resize, its working only for page reload HOT 1
- Unable to override jQuery defaults with data attributes - since it works partially, it's a BUG, not a FR HOT 1
- Image horizontal background position ignored HOT 1
- Glitching on scroll HOT 3
- Possible wrong documentation about picture tags HOT 2
- is there any way to pause video by default.I tried with autoplay option but it is not working... HOT 1
- Image Height Calculation is Off using Data Attribute HOT 1
- Options: multiple types simultaneously on an element HOT 1
- 500 document is not defined at Object (getWindowSize.js) HOT 1
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 jarallax.