Error Show/hide select based on dropdown selection

I’m using a code for show a dropdown selection based on a previous dropdown selection. The code works, however when I select the new dropdown, the first one disappear.

Here’s the jquery

When I select an option in the first select, I see two further selects displayed beneath it.

When I select an option from either of these two new selects, what are you expecting to happen?

If the answer is “nothing”, then just make your initial selector more specific, i.e. change this:

$("select").change(function(){ ... });

to:

$("select#sel-perfil").change(function(){ ... });
1 Like

Thank you! That’s exactly what I needed.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.