jquery_chained
jquery_chained copied to clipboard
Remove childs "Selected" attribute from <option> when parent is changed
If your using an "Selected" attribute on a child's option: <option selected>
and change the parent and then change back the parent again the child will change to the option with the selected attribute. A little bit annoying.
This little fix will remove the "Selected" attribute from the child's
$(document).ready(function () {
$("#mark").change(function () {
$("#series option:selected").each(function () {
$(this).removeAttr('selected');
});
})
});