Help Request! Troubleshoot "Not a valid selector"

Hi There Everyone,

I’m new to Wix and am working on my first website. I’m using all the code instructions to add a wishlist button to my product page inside wix stores. and everytime I try to connect the ‘button’ to the ‘action’ in the code, I get a flat that the button that i’ve just created is not a valid selector for the action I want to take. I’ve been through all the troubleshooting that I can find such as incorrect naming etc and still can’t fix it. I was wondering if there was any guidance some could give me? screen shot is below.

Please help :slight_smile: Thanks so much for your time

Devon

Hey
You must enter the same id in code that you have given the button. If you spell the id of the button with lowercase characters this is the id you must enter in the code.

Yes, I had seen the same thing and then saw that Andreas pointed it out.

In addition, I would say that “notInWishList” comports with excellent camelCasing naming standards (and is consistent with your other id-s); as a result, I recommend that you rename the button from “notinwishlist” to “notInWishList” rather than changing your code. Bottom line? JavaScript is case-sensitive!

Thank you so much everyone. Can’t believe it was such a silly mistake. Have a wonderful day