lundi 15 décembre 2014

add a class to fields from woocommerce products add-ons to hide with jquery


I am using woocommerce and the product add-ons extension to add 3 groups of fields to certain products in my shop. There are many fields, up to 23, for some products. What I am trying to accomplish is to hide the 2nd and 3rd groups of fields, hiding 20 of the 23 fields, until a user clicks on the title of that particular group of fields and then display that group.


I am thinking I need to use jquery to do this but I know little jquery. I believe I could find out how to hide an element based on a class easy enough and also to show an element based on a click event of another element.


Im just not sure how to add a class to certain elements, the group of fields I wish to hide, so that I can target them with jquery?


Please excuse me if my question is inappropriate because my thoughts on the way to do this are incorrect. I am very new to jquery.


I would greatly appreciate any help anyone could give.





1 commentaire:

  1. Yes i am totally agreed with this article and i just want say that this article is very nice and very informative article.I will make sure to be reading your blog more. You made a good point but I can't help but wonder, what about the other side? !!!!!!Thanks juul australia

    RépondreSupprimer