My html is such:
<select id="slctDiv2" class="slct"><option value="0">Any</option>
<option value="1">Administration</option><option value="2">Collections</option>
<option value="3">Distribution</option><option value="4">Engineering</option>
<option value="5">Treatment</option></select>
How do I get the ID of the select item (in this case "slctDiv2") if I found the selected option via jquery.
$('#slctDiv1,#slctDiv2').change(function(){
if($(this).parent().attr('id')=='slctDiv2'){
//do this
}else{
//do that
}
});
Using the parent function doesn't work.