flexbox, media queries, transition, animate, javascript etc
Design comparison
Solution retrospective
Is it possible to call a js function with an argument inside the addEventListener function?
Community feedback
- @palgrammingPosted over 3 years ago
The answer is yes this should help you look at the 5th example down https://www.w3schools.com/jsref/met_document_addeventlistener.asp
also you challenge looks good I like the way you did your validation
you might want to move your attribute out of your main design on wide screens it is going flex to the row of your content
0@AngelusLovellPosted over 3 years ago@palgramming Thank you, for your reference. It solved one of the most annoying problems I was facing.
Also, your appreciation means a lot to me, so thank you again.
By removing my attribute out of my main design, do you mean I should be removing my wrapper-responsive class from the main div or something else?
One last question how can I do achieve something like this - inputObj[3].addEventListener("focus", validateObj());
function validateObj() { if(inputObj[1] is keyup) do something; }
0@palgrammingPosted over 3 years ago@ShashaGazem for the attribution problem you need to take the FLEX off your body tag
0@palgrammingPosted over 3 years ago@ShashaGazem
inputObj3.addEventListener("focus", () => { validateObj() })
this might help you need to put a function in the EventListener here I used a Arrow formatted function and then call your function inside that function https://flaviocopes.com/javascript-arrow-functions/0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord