+ 3

CSS | JS. How to make transition replayable on every click? help

When I have onclick = "fun()" function func(){ Do stuff } The animation, transition or whatever it might be it only plays on the first click. It doesn't replay or the button won't work after the 1st click. On this code below, I'm trying to make the transition play everytime I click on the button. So it doesn't just play once and stay at it's position. I have event listener In this code Instead of onclick. https://code.sololearn.com/W8prIU0Ft6uv/?ref=app

30th Jun 2019, 5:23 PM
Ginfio
Ginfio - avatar
16 Réponses
+ 3
It works perfectly well, it just stays on the bigger width and height. To make it work, you have to make a kind of "switch", so it changes the width and height everytime. https://code.sololearn.com/W1061W552ImC/?ref=app
30th Jun 2019, 7:39 PM
Airree
Airree - avatar
+ 3
Maybe it doesn't support ES6. It should work now
30th Jun 2019, 7:49 PM
Airree
Airree - avatar
+ 2
Airree i got syntax error.
30th Jun 2019, 7:42 PM
Ginfio
Ginfio - avatar
+ 2
Which line?
30th Jun 2019, 7:43 PM
Airree
Airree - avatar
+ 2
Airree when i run the code, it just saya syntax error.(doesn't say what line)
30th Jun 2019, 7:44 PM
Ginfio
Ginfio - avatar
+ 2
Try it now, it might work. Otherwise, I can't really say what's the problem
30th Jun 2019, 7:45 PM
Airree
Airree - avatar
+ 2
Airree , 🤔 didn't work again, it might just be out devices difference/| Donno -- its fine'
30th Jun 2019, 7:48 PM
Ginfio
Ginfio - avatar
+ 2
Calviղ that works. Does () => mean function?
1st Jul 2019, 2:09 AM
Ginfio
Ginfio - avatar
+ 2
Yes, its function in ES6
1st Jul 2019, 2:10 AM
Calviղ
Calviղ - avatar
+ 2
Airree's code works fine in my browser.
1st Jul 2019, 2:26 AM
Chris Coder
Chris Coder - avatar
+ 2
Chris C. 🤔 i got a syntax error on mine.
1st Jul 2019, 2:30 AM
Ginfio
Ginfio - avatar
+ 1
update from setTimeout in the click event https://code.sololearn.com/W39xzhSIoDrD/?ref=app
1st Jul 2019, 2:02 AM
Calviղ
Calviղ - avatar
+ 1
Ginfio this works fine on my browser and smart phone. https://code.sololearn.com/W1061W552ImC/?ref=app
1st Jul 2019, 2:53 AM
Chris Coder
Chris Coder - avatar
+ 1
FEKPE JOHN This question has been asked 2 weeks ago. May I kindly suggest to move it to another question; or, better use the search bar since this is a very frequently asked question!
14th Jul 2019, 3:53 PM
Airree
Airree - avatar
0
OK thanks
14th Jul 2019, 4:04 PM
FEKPE JOHN
FEKPE JOHN - avatar
- 1
I want learn how to develop Mobile App. kindly help me to know those language to learn and how to start and why to start the development please.
14th Jul 2019, 3:47 PM
FEKPE JOHN
FEKPE JOHN - avatar