I've a select box and I've attached an event listener like below
$('#select').on('change', function(){
console.log("Changed")
})
This callback function will triggered if I manually change the select box and through jQuery using trigger method
$('#select').trigger('change');
So my requirement comes here, is there any way to check inside the change event listener whether the event is triggered manually or through .trigger('change') method
what I need exactly is,
$('#select').on('change', function(){
if(eventtriggeredmanually){
console.log("Changed"); // need to do some logics if it is triggered manually not through .trigger('change') method
}
})