+ 2

Why when I click the button dont happend

I want that when I click a button an animation happends and then reset, i dont know how to reset (Tell me), but I know how to appear the animation, I use HTML, CSS, JQuery and JavaScript. Also I have a problem with the images, when I wrote the code my first time the images appears. But now it didn’t. Check my code, plis tell me how to correct it: https://code.sololearn.com/WZE5a4PljMgP/?ref=app Here the same code, but the one that I gonna publish: https://code.sololearn.com/W6TLxXv77jK1/?ref=app

28th Apr 2018, 12:10 AM
Octavio Aguayo
Octavio Aguayo - avatar
17 Réponses
+ 3
I've removed HTML errors for you: https://code.sololearn.com/W7TN7INsxv5A/?ref=app <img> has no end tag, and certainly not </im> You also had some newlines I'm your image URLs, and other issues. Learn to use the HTML validator: https://validator.w3.org/nu/#textarea
28th Apr 2018, 12:33 AM
Emma
+ 2
Thank you so much
28th Apr 2018, 12:36 AM
Octavio Aguayo
Octavio Aguayo - avatar
+ 2
Thank you so much, and I’m working on a Tablet 😀
28th Apr 2018, 1:37 AM
Octavio Aguayo
Octavio Aguayo - avatar
+ 2
Thank you for checking my code
28th Apr 2018, 1:38 AM
Octavio Aguayo
Octavio Aguayo - avatar
+ 1
I've also validated the CSS (which was fine), and Javascript (which only had a few semicolons missing).
28th Apr 2018, 12:41 AM
Emma
+ 1
Octavio Aguayo Yes, but if the HTML is invalid that can mess up the DOM, which can effect javascript.
28th Apr 2018, 12:41 AM
Emma
+ 1
If your CSS worked across all platforms it might also help. Use percentages instead of pixels perhaps? The lightning button doesn't work with the CSS, but both buttons work if all CSS is removed.
28th Apr 2018, 1:29 AM
Emma
+ 1
It's not just the animation failing, the score doesn't decrement either with the CSS in place, but it does with all CSS removed.
28th Apr 2018, 1:34 AM
Emma
+ 1
Cover wasn't working for me in the Code Playground. I'm on a mobile phone though. Maybe it works for you on a laptop / desktop / larger screen?
28th Apr 2018, 1:36 AM
Emma
+ 1
The button a always work, but the animation not, I want: When button’s pressed the animation happends, the life is affected and the animation reset for the other turn
28th Apr 2018, 1:36 AM
Octavio Aguayo
Octavio Aguayo - avatar
+ 1
Anyway, your game looks great. Sorry I couldn't help further. I'll have to try on my laptop later ☺
28th Apr 2018, 1:37 AM
Emma
+ 1
Hopefully someone else can help you later. Wishing you success with your game ☺☺
28th Apr 2018, 1:40 AM
Emma
0
Enter the first, I have an error in the second, but I gonna fix it later, so enter the first
28th Apr 2018, 12:12 AM
Octavio Aguayo
Octavio Aguayo - avatar
0
Thank you, but Im looking for JS and JQuery help,
28th Apr 2018, 12:36 AM
Octavio Aguayo
Octavio Aguayo - avatar
0
I put a Css animation when a button is clicked, it dosent work
28th Apr 2018, 1:33 AM
Octavio Aguayo
Octavio Aguayo - avatar
0
Thank you for checking my other codes
28th Apr 2018, 1:33 AM
Octavio Aguayo
Octavio Aguayo - avatar
0
And why do you comment the “background-size: Cover”
28th Apr 2018, 1:34 AM
Octavio Aguayo
Octavio Aguayo - avatar