Hide product field based on variant - I'm really close! Code Provided! PLEASE HELP!

Hi!

This question has been asked a lot…with almost no answers. I feel like I’m really close but can’t figure out what I’m missing.

I have a custom product that I’m using variants and custom fields with. All I essentially want to do is hide/show my custom field if the user selects a certain variant.

My variant called “Fringe” is in my SingleOptionSelector-1 class in a dropdown field with 4 options:
None
Front Pocket
Bottom of Bag
Waterfall.

If the user selects “None” I don’t want my “Color of Fringe” field to show. I have a product.custom-2.liquid file I created so I know that part is working correctly.

I have provided my code below:

{% if template contains 'custom-2' %}
    
                   

       
               
        

        
        

 Left

 Right

        

        
                

        
{% endif %}

I have placed this in my product-template.liquid file between my {% Form %} elements and I’ve tried putting the script in my product.liquid file at the bottom as well as the product.custom-2.liquid file. I’ve tried renaming the class to ColoOfFringe and changing the my if/else to $(“#ColorOfFringe”) but it doesn’t matter what I do, I don’t seem to be making any progress on this.
Not sure what I’m doing wrong here, any help would be great!!

Here’s a preview link to the page if needed: https://ihrnt0p95ifcnw2a-10621452388.shopifypreview.com/products_preview?preview_key=8ea00c205dbcd04efda66adb8f9a6a96 (Only good for 14 days, I believe, so sorry if it doesn’t work later!)

Thank you!!

Hi @Blackstitch ! Did you find a solution for this? I have the same scenario and can’t seem to find a way to make it work. Please share, if possible. Thanks!