While working on applying transform styles through JavaScript, I attempted to find a more streamlined method for looping through vendor prefixes when applying the style. My solution involved creating an array with the prefixes and then using a for loop like the one below:
var transformVendor = [
'transform',
'OTransform',
'msTransform',
'MozTransform',
'WebkitTransform'
];
for (var i=0; i<transformVendor.length; i++) {
Element.style.transformVendor[i] = 'translate(10px,10px)';
}
Unfortunately, this approach does not seem to be functioning as expected. Can you help me identify if there is an issue in how I have implemented the for loop?