I'm in a situation where I need to dynamically animate the position of an element with jQuery. I have some external css that takes care of all things css, then my script adds a transform
inline style.
html:
<div></div>
css:
div {
width: 100px;
height: 100px;
background: pink;
transition: all 1s ease;
}
js:
$(function() {
setTimeout(function() {
$('div').css({
'-webkit-transform' : 'translateY(100%)',
'-ms-transform' : 'translateY(100%)',
'transform' : 'translateY(100%)',
});
}, 1000);
});
My question is why are all browsers I am testing (Safari 11.0.2, Firefox 56.0, Chrome 63.0.3239.84) ignoring the vendor-prefixing and returning the following?
<div style="transform: translateY(100%);"></div>
I'm obviously looking to support as many browsers as possible...
Fiddle here if seeing what the code does helps.