I'm trying to get all the option's
of a select that I have, but I've already used everything that is jQuery
code, but they do not. I am making a filter where the person will select a city and after selecting jQuery makes a request Ajax
to PHP
that returns cities to make some options of a second select
. This does it normally, but if the person is in the third select
and change the first one for example (city) then he has to restart the other filters, resetting the option's
of the second and third, and this is what I am not getting .
I'vetried:
$("#profissionalFiltro").find('option:not(:first)').remove();
$("#profissionalFiltro option").remove();
$("#profissionalFiltro").empty();
But none resolved.