omg omg - 1 year ago 105
jQuery Question

How to catch the event of change of <select > with jQuery?

<select id="target">
<option value="1">item1</option>
<option value="2">item2</option>
<option value="3">item3</option>

Say,I want to do some processing according to selected value.

Answer Source
$('#target').change( function() {
   $(this).find(":selected").each(function () {
            console.log( $(this).val() );
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download