Saturday, 15 August 2015

CSS Rotate with jQuery -



CSS Rotate with jQuery -

i'm trying clock css rotate , jquery. rotate part done, have spin in clock , stop @ time of computer's user.

the part can't spin , stop @ right time. code, now, is:

function horario(){ var = new date(); var hr = now.gethours(); var minutes = now.getminutes(); var hourdegraus = hr * 30; var minutedegraus = minutes * 6; $(".pont-hour").css({ webkittransform: 'rotate(' + hourdegraus + 'deg)'}); $(".pont-hour").css({ '-moz-transform': 'rotate(' + hourdegraus + 'deg)'}); $(".pont-hour").css({ 'transform': 'rotate(' + hourdegraus + 'deg)'}); $(".pont-minutes").css({ webkittransform: 'rotate(' + minutedegraus + 'deg)'}); $(".pont-minutes").css({ '-moz-transform': 'rotate(' + minutedegraus + 'deg)'}); $(".pont-minutes").css({ 'transform': 'rotate(' + minutedegraus + 'deg)'}); }

basically, want spin , in end pointers stop @ time in variables hourdegraus , minutedegraus.

any thought how can spin?

jquery css rotatetransform

No comments:

Post a Comment