Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #32546
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: Rotating something on click |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <2fae8fa9-b8dd-4aea-9240-453fb6fbbfdc@googlegroups.com> <c44411fe-ecc5-41bf-8d01-a32b4d72b3ac@googlegroups.com> <XnsA71584F59D071eejj99@194.109.6.166> <XnsA71585FF42594eejj99@194.109.6.166> <XnsA715878CB7C61eejj99@194.109.6.166> |
| Date | 2017-02-07 13:38 +0100 |
| Message-ID | <XnsA7158AC987BE7eejj99@194.109.6.166> (permalink) |
"Evertjan." <exxjxw.hannivoort@inter.nl.net> wrote on 07 Feb 2017 in
comp.lang.javascript:
> and this:
Just answering myself, like Jonas:
<div id=el style='width:50px;font-size:80px;'>qwerty</div>
<script type='text/javascript'> 'use strict'
document.getElementById("el").addEventListener("click", function(event) {
this.style.transition = 'all 1s ease';
let x =
'document.getElementById("el").style.transform = "rotate($deg)";';
window.setTimeout(x.replace('$','45'), 1);
window.setTimeout(x.replace('$','-45'), 1000);
window.setTimeout(x.replace('$','0'),2000);
}
);
</script>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Rotating something on click bit-naughty@hotmail.com - 2017-02-05 10:12 -0800
Re: Rotating something on click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-05 19:16 +0100
Re: Rotating something on click Martin Honnen <martin.honnen@gmx.de> - 2017-02-05 20:35 +0100
Re: Rotating something on click bit-naughty@hotmail.com - 2017-02-05 23:07 -0800
Re: Rotating something on click Martin Honnen <martin.honnen@gmx.de> - 2017-02-06 12:05 +0100
Re: Rotating something on click bit-naughty@hotmail.com - 2017-02-06 23:09 -0800
Re: Rotating something on click bit-naughty@hotmail.com - 2017-02-06 23:15 -0800
Re: Rotating something on click Osmo Saarikumpu <osmo@weppipakki.com> - 2017-02-07 11:09 +0200
Re: Rotating something on click Osmo Saarikumpu <osmo@weppipakki.com> - 2017-02-07 10:40 +0200
Re: Rotating something on click "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2017-02-05 13:36 -0800
Re: Rotating something on click Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-02-06 04:58 +0100
Re: Rotating something on click bit-naughty@hotmail.com - 2017-02-07 03:33 -0800
Re: Rotating something on click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-07 13:04 +0100
Re: Rotating something on click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-07 13:10 +0100
Re: Rotating something on click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-07 13:19 +0100
Re: Rotating something on click "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-02-07 13:38 +0100
Re: Rotating something on click bit-naughty@hotmail.com - 2017-02-07 23:52 -0800
csiph-web