How to change the price of a specific product depending on selected option on a dropdown

To give an example, imagine my product is a shirt. In the product page, theres a dropdown menu labeled “Breast Pocket?” with the options “yes” and “no”. If “yes” is selected, the price increases by $10. If “no” is selected, the prices stays the same. Ive manage to create the dropdown on my own but I cant seem to find the right variable to change the price depending on the option selected.

The only reason why Im doing it through code and not through shopify variants is because I also want to add a tooltip to the dropdown menu and I cant do that through shopify

Any help is appreciated!!

Correct way is to do it via variants. your tool tip problem can be solved using js and css.

Modifying price of an item is not possible, you can however try reducing the price using discounts if you are on shopify plus. However I would never recommend making it via code, go with variants, feel free to contact if you want to discuss in detail.