I have selectbox, after page loads selected item changed(via ajax call) and I need to catch this event, so I added this;
$(document).ready(function() {
document.getElementById("mySelectBox").addEventListener("change", function() {
debugger
}, true);
})
and expected when selected item changed async it triggers and step into the function inside listener but its not...
This can be solved using setTimeOut function, but its ugly and as you know there is possible side effects.
setTimeout(function(){*business logic*},2000)