i have a jQuery function that fires on any of two selects tags change , but my question is what the wrong i did in the conditions that check which select tag has fired
$(document).ready(function(){
$('#aqQuestionIoli .ConceptSelector1,#aqAnswerIoli .ConceptSelector1').on('change',function(){
var concetp = $(this).val();
alert(concetp);
$.getJSON("http://localhost/Mar7ba/InformationObject/getIOsForConcept/"+concetp+"/TRUE",function(data){
var options = '<option>Select IO</option>';
for(var i=0;i<data.length;i++){
options+="<option>"+data[i]+"</option>";
}
if ($('#aqQuestionIoli .ConceptSelector1').length){
$("#aqIoQuesSelector").html(options);
}
if ($('#aqAnswerIoli .ConceptSelector1').length){
$("#aqIoAnswerSelector").html(options);
}
});
});
});
Look at this for a simple example: http://jsfiddle.net/6zsnx/1/
Again, there are a number of ways you could do this. If we could see your HTML we could probably give you a cleaner answer.