Skip to content

Doesn't fire onChange #1

@NickVanderPyle

Description

@NickVanderPyle

$('#dd').flexselect();
$('#dd').change(function() { alert('never shows.'); }; <== never fires.

Quick fix:
In the pickSelected function add .change() after hidden.val().
pickSelected: function() {
var selected = this.results[this.selectedIndex];
if (selected) {
this.input.val(selected.name);
this.hidden.val(selected.value).change(); //<==
this.picked = true;
} else if (this.settings.allowMismatch) {
this.hidden.val("").change(); //<==
} else {
this.reset(); //Maybe fire change here?
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions