Why isn't jQuery hiding elements in Shopify's product.liquid?

blueberry-pay
Excursionist
14 0 12

Hi

I am using review app and I want to hide some elements such as buttons which is displayed on my site.

The code is imported in my product.liquid after my product-templage.liquid.

 

Within the product.liquid I add:

 

  {% unless customer %}
<script>
$(window).load(function(){
        $('.wc_review_form_btns').hide();
});
  </script>
{% endunless %}
 
But it does not work. If I just add the 
$('.wc_review_form_btns').hide();
within the browser it does work.
 
Can someone help why it is not working within product liquid?

 

 

Reply 1 (1)

Rajameltine
Explorer
59 4 3

Hi !

Need you url website

Need fastly help, contact me : https://freelancerajameltine.000webhostapp.com/
Besoin d'aide rapidement, faites appel à moi : https://freelancerajameltine.000webhostapp.com/
Email: rajameltine@gmail.com