i used a library call Maska to split credit card number into 4 segments, do you have any better idea to format credit card number input?
Block Flow
@blockfl0wAll comments
- @CharmaineHYMSubmitted over 2 years ago@blockfl0wPosted over 2 years ago
You can store the card number as string and then remove any extra whitespace potentially added by the user by using the
replace()
function I used this codenumber.value.replace(/\s/g, '');
. Then you can use theslice()
function to get the 4 segments of the value e.g.number.value.slice(0, 4);
This would get the first 4 numbers. Then repeat this 4 times to get each segment and from there you can do your validation0 - @piushbhandariSubmitted over 2 years ago
yeah, i didn't get the images working right, but least the accordion is on point
@blockfl0wPosted over 2 years agoyour font awsome script is trying to add
<body> ```for more on the
defer
attribute here is a mdn doc on it this also includes infomation about loading scripts asynchronously with theasync
attributeAlso your logic in your javascript makes it so there can only be one accordian open at one time it also means that an accordian has to be open at all times which can annoy users. When the website loads it opens the second accordian automatically if its going to open an accordian automatically It should be the first!
0 - @imadvvSubmitted over 2 years ago
I tried to add some bonus features to this solution as a part of the learning process.
please feel free to give your feedback!!
Have a good Day/ Night
@blockfl0wPosted over 2 years agoI'm not sure why but your instagram
broder-top:
style seems to not have border radius i'm not 100% sure but im guessing its since instagram has a gradient instead of a solid colour so i've found a relevent stack overflow discussion on it here that might help!Marked as helpful0 - @bineaaaSubmitted over 2 years ago
Pointing out flaws welcome :)
@blockfl0wPosted over 2 years agoThe
<article>
element is misused in this project the element should be used to show the entierty of a component. I would recomend that you switch all your<article>
tags to<section>
to help screenreaders determine what your trying to tell the user. For more info on the<article>
tag this mdn doc should help youyou also dont use a "landmark element" which includes elements like main, nav , footer, etc This helps screenreaders know the purpose of your website and understand the structure of it. It also helps with SEO I would recomend that you switch your div with the class "container-container" to a
<main>
element.This mdn doc will explain it better than me.
and this mdn doc will explain website structure and all the "landmark elements".
I hope this helps you!
0 - @abdullah-nawbaharSubmitted over 2 years ago
As I hadn't practiced my CSS skills, it was a bit difficult to come up with solution to this project. yet, I have finished it and you're free to make any comment on that.
Thanks
@blockfl0wPosted over 2 years agoIt looks like you havent set up your website correctly for help with github pages you can go to their documentation or you can go to their support page!
Marked as helpful0