Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,162,452 members, 7,850,577 topics. Date: Wednesday, 05 June 2024 at 04:34 AM |
Nairaland Forum / Science/Technology / Programming / I Am Learning Javascript, I Need Help With The Code I'm Writing (632 Views)
I Find It Hard Learning Javascript...i Need Help / How To Go About Learning Javascript Within Two Weeks / Difficulties Learning Javascript? This Will Change Your Life! (2) (3) (4)
I Am Learning Javascript, I Need Help With The Code I'm Writing by ugom123: 8:24am On Mar 14, 2021 |
Any help here please, will really appreciate. Been on this for more than 15 hours I have written and animated two images and text tags using Css keyframe animation. So, I want to be able to control these same animations using Javascript via two buttons I already created. I have researched and researched, can't solve this logic. The animation I did via css keyframe happened this way: When you load the page, the first image slide in from left, stayed for few seconds and slide out via left and the second image slide in and remained on the page. The texts tags animated for each of the images. Now, I want to be able to use the buttons to slide the images in and out after the css animations have completed. Help me, pls if you can. Thanks |
Re: I Am Learning Javascript, I Need Help With The Code I'm Writing by stanliwise(m): 8:31am On Mar 14, 2021 |
ugom123: You’re talking of event. Attach an event listener to the button. Create a function to do what you want, Create an event listener So your codes go like this function doTheAmination(){ } myButton.onclick => should call doTheAnimation 2 Likes |
Re: I Am Learning Javascript, I Need Help With The Code I'm Writing by ugom123: 8:51am On Mar 14, 2021 |
stanliwise: Thank you brotherly.so grateful that someone showed interest to help me. Pls, can I add you on WhatsApp? |
Re: I Am Learning Javascript, I Need Help With The Code I'm Writing by Karleb(m): 9:06am On Mar 14, 2021 |
Check out js sliders here https://www.w3schools.com/howto/howto_js_slideshow.asp |
Re: I Am Learning Javascript, I Need Help With The Code I'm Writing by stanliwise(m): 9:07am On Mar 14, 2021 |
ugom123:0 eight 1 72 eight 3 three zero 7 3 |
Re: I Am Learning Javascript, I Need Help With The Code I'm Writing by ugom123: 9:13am On Mar 14, 2021 |
stanliwise: Thank you so much bro. |
Re: I Am Learning Javascript, I Need Help With The Code I'm Writing by ahmedsaniadamu(m): 11:21pm On Mar 14, 2021 |
it's some times very hard to control CSS animation using JavaScript I prefer coding the animation itself using JavaScript timing event called setInterval (); with this event you can easily set control and manipulate HTML elements |
Re: I Am Learning Javascript, I Need Help With The Code I'm Writing by ugom123: 8:41am On Mar 19, 2021 |
ahmedsaniadamu: You have a point. I have noticed that it is hard to really control CSS animations especially, the keyframe ones. I have given up and will try and animate using javascript and set transition in css. |
Re: I Am Learning Javascript, I Need Help With The Code I'm Writing by Qsand: 4:56am On Mar 20, 2021 |
stanliwise:Does anyone still use on click... Shouldn't it be myButton.addeventlistener ('click', doTheAnimation) |
Re: I Am Learning Javascript, I Need Help With The Code I'm Writing by stanliwise(m): 10:40am On Mar 20, 2021 |
Qsand:Everything is a semantic perhaps I was writing a pseudo code |
Re: I Am Learning Javascript, I Need Help With The Code I'm Writing by bularuz(m): 11:05am On Mar 20, 2021 |
Is there anyone that can teach angular or vue |
(1) (Reply)
Life Of Mark Zuckerberg - A Documentary / Read Me: Something Made In Nigeria / Do You Need GTPAY Extension For Your Magento Website?
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 18 |