Design comparison
Solution retrospective
I had never done dark/light modes switch before, and on top of it, had to learn Drag and Drop 🤯, took me a while to figure this one out, but felt great once it was working. I really enjoyed this one, tips or any feedback will be appreciated. Happy Coding.
Community feedback
- @mrvicthorPosted almost 2 years ago
You may want to review your solution, tried to open it on my iPhone but I couldn’t access the input field. I think you should check the positioning
Marked as helpful0@BrunoSousaWDPosted over 1 year ago@mrvicthor thanks for the feedback, I think I got that fixed but ended up finding a bigger bug on the JS file 🤯.
0@BrunoSousaWDPosted over 1 year ago@mrvicthor once I drag and drop an item, the deleting and marking as complete functions won't work for those items. I found the problem, just gotta work on the solution.
here is the problem;
//
function swapItem(startPos, dropPos) {
//save the dropItem const dropItem = listItems[dropPos].innerHTML; //swap the drop item with the drag item listItems[dropPos].innerHTML = listItems[startPos].innerHTML; listItems[startPos].innerHTML = dropItem;
} //
0@mrvicthorPosted over 1 year ago@BrunoSousaWD alright, i will review your code tomorrow
Marked as helpful0@BrunoSousaWDPosted over 1 year ago@mrvicthor I've made some changes, I got it to work 50%( still not saving when the li is marked as complete when the element is dragged), but the code isn't dry. thanks for your time. Cheers
0@mrvicthorPosted over 1 year ago@BrunoSousaWD fantastic, I just checked it but couldn’t find anything wrong with it
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