Displaying or hiding multiple fields based on selection dropdown - jquery
问题 I have a form containing a dropdown. Depending on the selection made in the dropdown, multiple fields should appear or hide. The jquery function, I have written, works only for one fields. If I select no in the dropdown only the title what is hidden the rest stays. I don't quite understand why. I could solve this by giving each field id another name (for example showing1, showing2, ...) and refer to this id in the function but that is a lot of repetition. Shouldn't there be a better way? Link