Hello fellow programmers. Hope you’re all fine ?
So, I’m making a site for my girlfriend, she wants to sell her hand-made necklaces over the Internet.
To give this site some “animation” and make it more productive for her bussiness, I’m thinking of let the users build their own necklace.
There will be separated images of each little piece to choose to add to the empty string (not in terms of code, just a string to hold the various pieces of a necklace ? ) that will appear at the begin. Whenever the user click on one of the pieces, it will be added to that string. If the user click on the piece on the string, it will dissapear and the others on each side will join together.
Problem is: I never coded on Javascript. I choose this language now because I want something that doesn’t refresh the page each time a piece is clicked.
So, if someone could please give me some guidelines or some code, I would really really be greatful!
I’m thinking of some sort of array that has the clicked images and draws them everytime a change occours, but don’t know if it’s the right way, how will I do to remove a piece already on the string when clicked, etc.
Thanks.