Link to home
Start Free TrialLog in
Avatar of Rabbit W
Rabbit W

asked on

Add Items in the product category page

I have come across this page per the following link.  A button "Add to List" is at the right side of the image. When the user clicks Add to the list button, it will be added to the My List.

The button turns to Remove from the list once Add to List has been clicked.  How to accomplish it? Thank you!

https://www.pcna.com/leeds/en-us/leeds-mobiletech-power/product/7121-50_reg-
Avatar of Zakaria Acharki
Zakaria Acharki
Flag of Morocco image

Please try to describe more what you want and update the link since it will lead us always to "The page cannot be found." message.

User generated image
Avatar of Rabbit W
Rabbit W

ASKER

Per the attached images, when the user clicks Add to List button, the image is added to my list. When clicking  my list link, the added image is displayed. After the user adds the image to my list, the button has been changed to remove from list.
1.png
2.png
3.png
SOLUTION
Avatar of Zakaria Acharki
Zakaria Acharki
Flag of Morocco image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You are my hero! Could you give me the complete example including adding to the list? Thank you!
Hi Zakaria, I might miss the js file. What is <script type="text/javascript" src="xxx.js"></script> in the head?
Thank you!
How to add the items to the list and then remove these from the list?

Thank you!
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you very much Zakaria! Is there any way to remove the images from the list as well when the item list number decreased? Thank you!
You're welcome, not sure what you mean by when the item list number decreased?
Remove the images from the list.
Isn't the image remove already working when you click "Remove from List"? on you mean adding a sort of button inside the "My list" area that removes every image?
Sorry, I just updated my css file and now I can see the images now.  Thank you!
No worries, glad I could help.