jQuery + Jeditable - detect when select is changed
- by Bryan Roth
I'm using Jeditable for in-place editing. One the controls I am working with has the select type. When a user clicks on the field, the following select control is generated:
<div id="status" class="editable_select">
<form>
<select name="value">
<option value="Active">Active</option>
<option value="Inactive">Inactive</option>
</select>
<button type="submit">Save</button>
<button type="cancel">Cancel</button>
</form>
</div>
What I am trying to figure out is how to use jQuery to detect when that select control is changed, especially since it doesn't have an ID attribute.
This is what I have so far, but the event is not getting triggered:
$(document).ready(function () {
$('#status select').change(function () {
alert("Change Event Triggered On:" + $(this).attr("value"));
});
});