Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Osmo Saarikumpu Newsgroups: comp.lang.javascript Subject: Re: Rotating something on click Date: Tue, 7 Feb 2017 11:09:09 +0200 Organization: A noiseless patient Spider Lines: 14 Message-ID: References: <2fae8fa9-b8dd-4aea-9240-453fb6fbbfdc@googlegroups.com> <29f0bd65-889c-45f1-bf2f-f5e36713ee44@googlegroups.com> <8e5108ba-40e6-4cc8-bd0e-cfee622b0285@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 7 Feb 2017 09:07:23 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="1720291894028d7569f728478e21abb3"; logging-data="3459"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19K13s2RgYwgcPsphLARzj8" User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 In-Reply-To: Cancel-Lock: sha1:Pem92B1UgJeAvmwHP6UYckvWYkc= Xref: csiph.com comp.lang.javascript:32536 On 07/02/2017 09:15, bit-naughty@hotmail.com wrote: > https://css-tricks.com/controlling-css-animations-transitions-javascript/ > > In "Manipulating CSS Transitions", it says: "To trigger an element's transition, toggle a class name on that element that triggers it." - could you give me an example of this? It's kind of hard to visualise in my head.... As a rule of thumb, it is best to manipulate classes through the className property, as all the style properties can be set in CSS (cleaner scripts, easier maintenance). IOW, change the elements class instead of it's individual style properties. For syntax examples see e.g.: http://www.w3schools.com/jsref/prop_html_classname.asp -- Best wishes, Osmo