javascript - Set CSS -moz-transition with JS -
i'm making webapp , i'm using css3 make div transform i'm big problem firefox. can make chrome, opera , ie working firefox not. set working browsers use:
obj.style.webkittransform = "translatex(17%)"; obj.style.moztransform= "translatex(17%)"; //edited obj.style.mstransform = "translatex(17%)"; obj.style.transform= "translatex(17%)"; //edited
i've tried jquery $("#content").css( "-moz-transform", "translatex(17%)" ); , lot of things found on internet , nothing. sugestion?
edit: in context, original function:
function mousewheelevt(obj) { if (window.addeventlistener) window.addeventlistener('dommousescroll', wheel, false); window.onmousewheel = document.onmousewheel = wheel; var slide=0; function wheel(event) { var delta = 0; if (!event) event = window.event; if (event.wheeldelta) { delta = event.wheeldelta; if (window.opera) delta = -delta; } if (delta) { if (delta < 0 && slide<=0 && slide>-6) { slide--; console.log(slide); obj.style.webkittransform = "translatex("+(17*slide/2)+"%)"; obj.style.moztransform = "translatex("+(17*slide/2)+"%)"; obj.style.mstransform = "translatex("+(17*slide/2)+"%)"; obj.style.transform = "translatex("+(17*slide/2)+"%)"; } else if (delta > 0 && slide<=-1 && slide>=-6) { slide++; console.log(slide); obj.style.webkittransform = "translatex("+(17*slide/2)+"%)"; obj.style.moztransform = "translatex("+(17*slide/2)+"%)"; obj.style.mstransform = "translatex("+(17*slide/2)+"%)"; obj.style.transform = "translatex("+(17*slide/2)+"%)"; } } } }
well, you’re switching , forth between “transition” , “transform”. in question.
obj.style.webkittransform = "translatex(17%)"; obj.style.moztransform = "translatex(17%)"; obj.style.mstransform = "translatex(17%)"; obj.style.transform = "translatex(17%)";
Comments
Post a Comment