Skip to content

Instantly share code, notes, and snippets.

@chris-held
Created November 15, 2013 19:41
Show Gist options
  • Select an option

  • Save chris-held/7490372 to your computer and use it in GitHub Desktop.

Select an option

Save chris-held/7490372 to your computer and use it in GitHub Desktop.
feather.Widget.load({
path: 'widgets/static/stateDropdown/',
clientOptions: {
parent: me,
container: me.get('#state_dropdown_div'),
name: 'state',
onceState: {
ready: function() {
var stateDD = this;
if(profile.fundraiser.contactInfo && profile.fundraiser.contactInfo.addresses && profile.fundraiser.contactInfo.addresses.primary){
stateDD.get("#states option[value='" + profile.fundraiser.contactInfo.addresses.primary.state + "']").attr("selected", "selected");
stateDD.get("#states").trigger('change');
}
}
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment