var wheel2 = document.querySelector("#wheel2"), button2 = document.querySelector("#button2"), rando = 0; var spin_wheel2 = function() { rando += (Math.random() * 360) + 2880; wheel2.style.webkitTransform = "rotate(" + rando + "deg)"; wheel2.style.mozTransform = "rotate(" + rando + "deg)"; wheel2.style.msTransform = "rotate(" + rando + "deg)"; wheel2.style.transform = "rotate(" + rando + "deg)"; } button2.addEventListener("click", spin_wheel2, false);