javascript - jquery reset load file back to default -
i have 3 layer select
use jquery load option
sub-select
country->state->city
so if user select usa, 2nd select
load usa's state. user can select city after select state.
ex. usa->ca->la
however if user select usa->ca->la first user want change country aus
it become aus->select state->la, 3rd select
still stay same.
is way reset 2nd, 3rd select
default if user change top select
.
$("#country").change(function(){ switch($("#country").val()){ case "aus":$("#state").load("aus_state.php");break case "uk":$("#state").load("uk_countie.php");break case "usa":$("#state").load("us_state.php");break } });
how remove load files default?
Comments
Post a Comment