Reputation: 23576
Is there a jQuery event that gets fired when a user selects a value from a drop down list?
I need to load the next part of a form based on the selection a user makes in the first drop down and would like to avoid a button press.
Thanks
Upvotes: 0
Views: 2750
Reputation: 17598
The .change()
event is fired when someone selects a value from a list.
If you don't have a blank default value as the first option ('Select One'), you'll need to explicitly trigger the .change event when the page loads to display whatever content for the first item.
Upvotes: 1
Reputation: 14446
You can use plain old Javascript for this:
<select onchange='callMyMethod()'>
Upvotes: -1