Skip to content
Advertisement

Show Div with jquery depending on list (php)

I have read how to show/hide a div with jquery when there is a dropdown selection, built with “select” and options.

However, I am trying to figure out how to do this when I have the following code for a dropdown selection.

JavaScript

This list displays a dropdown of options and I want for a specific option to show/hide a div.

The following code could work for a select with a specific id,”purpose”, for example, but in my situation how I am supposed to use it?

JavaScript

This is the html of the output of the php code

This is the html of the output of the php code

Thank you

Advertisement

Answer

Try code should work for you

JavaScript
JavaScript
JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement